问题:数据库操作是报错,是什么原因

本周有客户提交问题,说他在操作数据库的时候会报错,报错如下mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD(‘your_existing_password’). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file,这个问题是因为服务器上的数据库版本与客户的数据库文件版本不一致导致的,需要使用命令重置下密码就可以了。重置密码的命令如下UPDATE mysql.user SET password=PASSWORD(‘11009380’) WHERE User=‘a0106150047’;

FLUSH PRIVILEGES;

猜你喜欢

转载自blog.csdn.net/LuHai3005151872/article/details/107359313
今日推荐