错误信息
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位模式即可