mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused
来源:互联网 发布:二尺袖配袴 淘宝 编辑:程序博客网 时间:2024/05/21 15:47
做了一下mysql升级,开发机上mysql升级到5.6版本,结果连接一些低版本的mysql服务器报出如下异常:
Warning: mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
异常原因在于服务器端的密码管理协议陈旧,使用的是旧有的用户密码格式存储;但是客户端升级之后采用了新的密码格式。mysql5.6版本遇到这种不一致的情况就会拒绝连接。
详见mysql手册“Server Command Options”一节中“--secure-auth"选项的说明:http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_secure-auth
解决方法有如下两种:
1、服务器端升级启用secure_auth选项;
2、客户端连接时off掉secure_auth,即连接时加上--secure_auth=off,如:mysql -p10.51.1.11 -P3308 -uroot --secure_auth=off
对于方法二,使用在程序做相应mysql配置即可,以php为例,在php.ini中设置secure_auth=off
- mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused
- Could not connect: Connection using old (pre-4.1.1) authentication protocol
- ERROR 2049 (HY000): Connection using old (pre-4.1.1)
- 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.
- Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- MySQL 4.1+ using old authentication
- mysqlnd cannot connect to MySQL 4.1+ using old authentication
- Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authenticat
- mysql数据库总是连接失败,Warning:mysql_connect() :Connection refused...
- ERROR 2049 (HY000): Connection using old
- 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
- php连接MySQL时产生错误:mysqlnd cannot connect to MySQL 4.1+ using old 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错误解决办法
- TNS:no listener: TNS:protocol adapter error: Connection refused
- HDU4104----Discount
- js 一些常见的用法。转义符,替换文本。
- JQuery优化规范
- 如何利用pcap接口从数据链路层发包?
- IE和Firefox 脚本不兼容问题
- mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused
- (转)Android开发:Invalidate和postInvalidate刷新View的区别
- C#日期和时间的格式化输出
- UVA 10859 Placing Lampposts (动态规划)
- MySQL之二十种性能优化的经验
- 短文 词频
- JS性能优化笔记
- 改变——从我做起!
- uploadify初始化时自动会向服务器请求一次请求的地址是当前jsp页面所在的地址