June 25, 2015

PHP/Mysql compatibility - PDO::__construct(): authentication method unknown

If you are getting this error during DAP livelinks activation:
Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in

This indicates a php version incompatibility with mysql libraries installed on your webhost. 

Resolution:

Please open a ticket with the webhost and have them do one of the following:

The problem is your webhost is using a new version of mysql client library (mysqlnd library) that expects to connect with MySQL 4.1's newer 41-byte password format but the mysql user on your webhost's mysql server is using an old 16-byte password hash. 

This is causing mysql_connect() to fail resulting in SQL errors.

Please send the following to your webhost support and have them do this:

1) Run this command :
SELECT Host, User, Password FROM mysql.user;

If your password is sixteen characters, this is because you have used OLD_PASSWORD on your user's or have been running an old version of MySQL. 

2) To update type in :

UPDATE mysql.user SET Password=PASSWORD('newpass')
WHERE User='root' AND Host='localhost';

FLUSH PRIVILEGES;

Swap root, localhost and newpass in the query above with your mysql username, hostname and your password respectively. 

3) Now when you re-type

SELECT Host, User, Password FROM mysql.user;

Your password should have changed. 

It should resolve all the PDO errors.

===============================

Another solution (ONLY if the one above does not work)
You can open a support ticket with liquidweb and have them do ONE of the following :

1. Downgrade PHP version
OR
2. Upgrade the MYSQL Libraries to match the version of MYSQL on the server.
OR
3. Change the my.cnf file
Comment out OLD_PASSWORDS = 1
restart mysql
Create or modify a user with the password desired (you can use the username/password from wp-config.php)
Uncomment out OLD_PASSWORDS = 1
restart mysql


tham khao: https://dev.mysql.com/doc/refman/5.5/en/old-client.html

http://forumsarchive.laravel.io/viewtopic.php?id=8667

0 comments:

Post a Comment