Special characters in MySql Password

MySQL 5.6.6 is the first release that has any password strength guidelines or enforcement.

See https://dev.mysql.com/doc/refman/5.6/en/validate-password.html

But for what it's worth, there have never been any restrictions on the length of a password or characters supported. MySQL stores a hash of the password string, not the string itself, and hashes are always stored as a fixed length string of hexadecimal digits, not the plaintext password.

You aren't specific about what problems your app is having with MySQL passwords. Perhaps if you edit your question to describe these problems in more detail, you can get a more specific answer.


I'm using MariaDB 10.0.13 - the '\' character is a bit special. If defining a password using PASSWORD('text'), make sure to escape use of '\'.

Example: set password for user@localhost = PASSWORD('\\');

You can then use a single '\' for the password with mysql: mysql -u user --password='\'