Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authenticat
来源:互联网 发布:大数据时代 信用风险 编辑:程序博客网 时间:2024/05/21 14:05
Warning: mysql_connect(): Premature end of data (mysqlnd_wireprotocol.c:554) in D:\WwwRoot\AutoDial\mysql_connect_test.php on line 7 Warning: mysql_connect(): OK packet 1 bytes shorter than expected in D:\WwwRoot\AutoDial\mysql_connect_test.php on line 7 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
【解决方法】
1. 找到配置文件my.cnf(Linux,/etc/my.cnf)或my.ini(win,安装目录),打开,将其中old_passwords=1注释掉;
2.重启mysql;
3. 将mysql用户对应的密码重新设定一下(set password for 'user_test'@'{这里写你的地址}' = password('123456'))。
【原因】
有 的安装情况下,MySQL 5.0 为了和4.1之前的版本兼容,用户密码(mysql数据库的user表password字段)保存的是密码的16位hash值,而PHP5.3的 mysql驱动使用41位的密码hash值进行用户验证,所以需要让mysql中保存用户密码的41位hash值,但配置文件中 old_passwords=1的话,password()函数只能返回16位hash值。参考mysql5.0文档security章password hashing in mysql节。
转自:http://topic.csdn.net/u/20110306/12/d6f13885-da88-46c4-a37d-eae656bf65ca.html
- Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authenticat
- Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication.
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication问题解决
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure【解决方法】
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication错误解决办法
- 在万网虚拟主机上连接数据库出错mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- mysqlnd cannot connect to MySQL 4.1+ using old authentication
- mysqlnd连接数据库的问题(mysqlnd cannot connect to mysql 4.1+ using old ..)
- php连接MySQL时产生错误:mysqlnd cannot connect to MySQL 4.1+ using old authentication
- php 5.3:connection failed:SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using old auth
- Error: mysql error: mysql: [Warning] Using a password on the command line interface can be insecure
- zabbix监控mysql之Warning: Using a password on the command line interface can be insecure.
- Error: MySQL server is requesting the old and insecure pre-4.1 auth mechanism.
- 【Android】achartengine的柱状图和饼状图的使用
- 豆浆!——骑上广东第一峰看看日出
- Centos6下配置openstack icehouse使用virtio-scsi
- org.springframework.web.util.Log4jConfigListener
- Xml文件合并、拼接
- Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authenticat
- STAF 读取命令执行结果的返回值
- 第十三周项目二成绩处理
- Thread.sleep()和thread.wait()
- Android笔记六.List+Set+Map
- HDFS write流程与代码分析(Hadoop 2.0)
- 为什么 SeaJS 模块的合并这么麻烦
- 单向链表 ——实现过程举例
- 那些相见恨晚的 JavaScript 技巧