关于mysql的secure_auth
来源:互联网 发布:深圳房产成交数据 编辑:程序博客网 时间:2024/05/23 13:03
最近做服务器部署,服务器mysql的版本是5.5.37,而客户端用的mysql库是5.6.15,结果就是死活连不上,开始以为是云服务器之间的路由不通。
不过经过核实之后,和链路无关。
然后在本地调试。输出连接失败信息如下:
mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
mysql官网给的说明
--secure-auth
--secure-auth
Option-File Formatsecure-auth
System Variable Namesecure_auth
Variable ScopeGlobalDynamic VariableYes Permitted Values (<= 5.6.4)Typeboolean
DefaultOFF
Permitted Values (>= 5.6.5)Typeboolean
DefaultON
This option causes the server to block connections by clients that attempt to use accounts that have passwords stored in the old (pre-4.1) format. Use it to prevent all use of passwords employing the old format (and hence insecure communication over the network). Before MySQL 5.6.5, this option is disabled by default. As of MySQL 5.6.5, it is enabled by default; to disable it, use --skip-secure-auth
.
1、服务器这边,在my.cnf中加上
secure-auth=1
重启 service mysqld start
2、客户端这边,mysql_options(mysql,MYSQL_SECURE_AUTH,(my_bool*)0);
建议采用方案1。
参考
http://blog.csdn.net/zuyi532/article/details/10148259
- 关于mysql的secure_auth
- secure_auth 与 old_passwords
- 关于mysql的limit
- 关于mysql的国际化
- 关于MYSQL的点点
- 关于Mysql的一些
- 关于mysql的“行号”
- 关于mysql的开发
- 关于mysql的密码
- 关于mysql的乱码
- 关于mysql的大小写
- 关于mysql的介绍
- 关于mysql的使用
- 关于mysql的使用
- 关于mysql的安装
- 关于mysql 的limit
- 关于mysql的事物
- 关于mysql的数据类型
- hdu 1201闰年 统计18岁天数 20140723.cpp 改编版
- ios call phone
- cout 堆栈,operator<< 运算符重载输出问题
- 字符编码笔记:ASCII,Unicode和UTF-8
- HDU 2083 简易版之最短距离
- 关于mysql的secure_auth
- 读配置文件操作对象
- poj1363——Rails(简单栈结构)
- UVa1630 Folding/poj 2176 Folding/zoj 1554 Folding
- photoshop cs5在win8.1上安装启动问题
- WPF的Presenter(ContentPresenter)
- python项目开发环境的整理规范化
- pat1012
- “Pragma:No-cache”标记可能无法防止页面被缓存