PHP5.3连接MySQL出现 mysqlnd cannot connect to MySQL 4.1+ using old authentication错误
1、编辑my.cnf注释掉一下行:
old_passwords = 1
2、重启MySQL
service mysqld restart
/etc/inint.d/mysqld restart
3、检查是否有16位的密码
SELECT user, Length(`Password`) FROM `mysql`.`user`;
4、如果有,把对应的用户名密码用以下SQL更新
UPDATE mysql.user SET Password = PASSWORD('password') WHERE user = 'username';
5、更新后要刷新
FLUSH PRIVILEGES;
posted on 2010-06-30 14:07
蓝剑 阅读(1573)
评论(0) 编辑 收藏 所属分类:
Linux