MySQL remote connection fails with “unknown authentication method”

Assuming you’re using PHP 5.3+, you could be experiencing one of the Backward Incompatibility Changes:

The new mysqlnd library necessitates the use of MySQL 4.1’s newer 41-byte password format. Continued use of the old 16-byte passwords will cause mysql_connect() and similar functions to emit the error, “mysqlnd cannot connect to MySQL 4.1+ using old authentication.”

If so, see https://stackoverflow.com/a/1340538/187954 for information on updating your password.

Leave a Comment