3

I upgraded from PHP 5.3 to 5.6 to take advantage of >2GB upload capability in 5.6. In doing so, the following line dies:

$db = ($GLOBALS["___mysqli_ston"] = mysqli_connect($dbhost,  $dbuser, $dbpass))
    or die("The site database appears to be down.");

The logfile message is:

mysqli_connect(): The server requested authentication method unknown to the client

What about upgrading to PHP 5.6 would cause this line to fail?

a coder
  • 7,530
  • 20
  • 84
  • 131

1 Answers1

2

Issue resolved. MySQL was updated at the same time as PHP. The old version of MySQL used the old password style, which didn't work with the new version of PHP.

The solution was to log into MySQL on the server and reset passwords from the old 16 character hashes to the new ~40 character hashes.

SET PASSWORD FOR 'someuser'@'localhost' = PASSWORD('somepassword');
FLUSH PRIVILEGES;

Once that was done the site is working OK again.

Community
  • 1
  • 1
a coder
  • 7,530
  • 20
  • 84
  • 131