mysql 版本太低,php版本高,连接mysql报错

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

1、vi /etc/my.cnf

old_passwords = 1  改为 old_passwords = 0

重启 mysql

root用户进入mysql

mysql>use mysql;
mysql> update user set password=password("ccdb") where User='yuanziyang' and Host='%';
mysql> flush privileges;
mysql> exit;     

你可能感兴趣的:(mysql,update,where,password,cannot)