Quoting a password using mysql or mysqldump

Published On: 2011-12-04

Category: Jargon Jabberwocky

Trying to use one of the following symbols in a mysql password using -p from the command line will throw you an error: * ? [ < > & ; ! | $ \ ( ) # ~ { } ] " ' The solution is to surround the whole -p parameter in quotes. IE:
mysqldump -uusername '-p*#&PassWord&#*' database > dump.sql