首页 > 代码库 > mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication的解决方法

mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication的解决方法

直接命令行操作没有问题,但是PHP连接就会报上面的错误。

SET old_passwords =0;USE mysql;UPDATE user SET password =PASSWORD(‘yourpassword‘) WHERE user=‘testuser‘ limit 1;SELECT LENGTH(password) FROM user WHERE user=‘root‘;FLUSH PRIVILEGES;

mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication的解决方法