I'm trying to use mysqldump to take a snapshot of my database, however the root password has brackets in and is causing me issues. As far as I knew, I could surround the password with [] in order for it to work but I still have an issue.
What's the correct way to format this?
mysqldump -u root -p[(pwdwithbrackets)] databasename > file.sql
-bash: syntax error near unexpected token `('
Use shell escape techniques:
-p\(pwdwithbrackets\)
... or:
'-p(pwdwithbrackets)'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With