mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication

我在使用easyPHP的时候,连mysql连不上,报错

 写道
mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication

原因应该是密码长度或者格式不对,解决办法:

SET old_passwords = 0;
UPDATE mysql.user SET Password = PASSWORD('testpass') WHERE User = 'testuser' limit 1;
SELECT LENGTH(Password) FROM mysql.user WHERE User = 'testuser';
FLUSH PRIVILEGES;

猜你喜欢

转载自yuandingping.iteye.com/blog/1560591