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

Related Posts:

  • How to Change the Location of MySQL on cPanel There may be some situations where you have to move the location of MySQL, for example, if you’re out of disk space or perhaps looking to host it on another device to increase performance. Whatever the reason, moving MySQL i… Read More
  • Installing Custom MySQL Versions If at all possible, you should use WHM to install MySQL, however, if you need a version of MySQL outside of what they are offering in current cPanel versions, it is possible to install your own versions. These instructions … Read More
  • Disk Space for MySQL Databases in cPanel Show as 0MB When you upgrade from cPanel 11.24 to 11.25, your users may notice that in cPanel, their MySQL databases show 0MB of disk space used, when they know their databases are much larger. This is due to an option in cPanel that yo… Read More
  • MySQL Basics Install MySQL Server Debian/Ubuntu [mitesh@Matrix ~]$ sudo apt-get update && sudo apt-get install -y mysql-server Redhat/CentOS [mitesh@Matrix ~]$ sudo yum install -y mysql-server Important Files Configuratio… Read More
  • Restoring Database Privileges I’ve seen several cases in the last few months where database users seemingly “disappear” or privileges appear to become invalid when restoring MySQL data or an entire server from raw backups. This may commonly be attributed… Read More

0 comments:

Post a Comment