I've been setting up a new D7 site over the last few weeks, just upgraded to the latest 7.39 yesterday, and all modules and themes were up to date.

My server was upgraded last night to PHP 5.5 and MySQL 5.5 on a CentOS server. Now I get the following error on my site:

Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in DatabaseConnection->__construct() (line 307 of /home/rpvault/public_html/includes/database/database.inc).
Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in DatabaseConnection->__construct() (line 307 of /home/rpvault/public_html/includes/database/database.inc).
Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in DatabaseConnection->__construct() (line 307 of /home/rpvault/public_html/includes/database/database.inc).
Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in DatabaseConnection->__construct() (line 307 of /home/rpvault/public_html/includes/database/database.inc).
Warning: Cannot modify header information - headers already sent by (output started at /home/rpvault/public_html/includes/database/database.inc:307) in drupal_send_headers() (line 1232 of /home/rpvault/public_html/includes/bootstrap.inc).
PDOException: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client in lock_may_be_available() (line 167 of /home/rpvault/public_html/includes/lock.inc).
Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in DatabaseConnection->__construct() (line 307 of /home/rpvault/public_html/includes/database/database.inc).

I did some searching and this seemed to be related to how MySQL performs the hash on the database user password. Most suggestions were to delete and re-create the database user. I did that, but the error remained the same. Others in those threads also reported mixed results, worked for some, not for others.

None of those threads really seemed to resolve the issue completely, were left hanging.

So, how can I fix this?

Comments

vm’s picture

when you deleted and recreated the database user did you utilize a new password followed by updating password in settings.php?

based on http://stackoverflow.com/questions/1340488/mysql-php-incompatibility/134... you can test the password.

Steel Rat’s picture

I did use a different password, and updated it in settings.

The problem was resolved by my host, "old_passwords=1" had been added to the global MySQL config. once that was disabled, the site started working normally.

Thanks for the reply!