您的位置:首页 > 数据库 > MySQL

mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication.

2016-12-23 12:46 691 查看

错误信息

Warning: mysql_connect(): 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 in D:\xampp\htdocs\file.php on line 7


错误原因

PHP5.3、5.4、5.5版本访问数据库时候,mysql加密模式必须设置为41位。否则会报上面的错误

解决办法

服务器提供商处修改密码时候选择41位模式即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql
相关文章推荐