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;

你可能感兴趣的:(Authentication)