vc++>>Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enable
用VC来连接远程MYSQL时,出现如标题一样的错误,网上搜索了此错误产生的原因,最后自己找到了解决办法。
此错误产生的原因:
异常原因在于服务器端的密码管理协议陈旧,使用的是旧有的用户密码格式存储;但是客户端升级之后采用了新的密码格式。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参数设置为否,不使能即可;
命令行时:mysql -p10.51.1.11 -P3308 -uroot --secure_auth=off,
在VC编程中:
mysql_init(&mysql);//初始化
mysql.options.secure_auth=false; // 关闭secure_auth
vc++>>Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enable的更多相关文章
- ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
mysql安全机制的问题 解决: mysql -P 3306 -h host -u account --secure_auth=off -pmysql -P 端口号 -h 主机地址 -u 账号 --s ...
- mysql问题Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)的解决方法
在mysql命令行界面输入 mysql> set old_passwords=0;mysql> SET PASSWORD FOR hhds_test=PASSWORD('hhds_test ...
- mysql连接错误解决(ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled))
当使用mysql的新版本是,连接老版本的mysql,就会有可能报: ERROR 2049 (HY000): Connection using old (pre-4.1.1) authenticatio ...
- Go丨语言对数据库操作报错 panic: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine actively refused it.
panic: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine ac ...
- No connection could be made because the target machine actively refused it [::1]:808
No connection could be made because the target machine actively refused it [::1]:808 1.首先查看端口占用情况, 在 ...
- k8s遇坑:The connection to the server k8s-api.virtual.local:6443 was refused - did you specify the right host or port?
k8s坑The connection to the server localhost:8080 was refused - did you specify the right host or port ...
- pg_dump: [archiver (db)] connection to database “dbase” failed: FATAL: Peer authentication failed for user “postgres”
"Peer authentication" means that it's comparing your database username against your Linux ...
- mysql: Error Codes and Messages
Appendix B. Error Codes and MessagesTable of Contents B.1. Server Error Codes and MessagesB.2. Clien ...
- MYSQL之错误代码----mysql错误代码与JAVA实现
原文地址:MYSQL之错误代码----mysql错误代码与JAVA实现作者:戒定慧 his chapter lists the errors that may appear when you call ...
随机推荐
- HDU 5884 (贪心)
problem sort 题目大意 有n个数组,每个数组有a[i]个元素,每次可以将至多k个数组合并为一个数组,所花费代价为这些数组的元素和.给定代价上限,求将所有数组合并为1个数组的最小k. 解题分 ...
- web页面放到手机页面,缩放问题
有时候写页面样式不规范,很多页面元素写死尺寸时,web页面尺寸比较大放到移动端访问时,就背缩放了,div或者按钮变得好小 可以加段js,效果会好点 <script> ! function( ...
- removeClass color-*
bootstrap推出一系列的class名称,例如col-md-*.btn-*等等,有时候就会有想要将这一类className删掉的冲动~ 那咋样才能妥妥的实现呢?你是不是已经看到下面答案了,诶诶.. ...
- etl工具
ETL 工具下载全集 包括 Informatica Datastage Cognos( 持续更新) Datastage 8.0 BT种子下载:http://files.cnblogs.com/ta ...
- iOS给UIimage添加圆角的两种方式
众所周知,给图片添加圆角有CALayer的cornerRadius, 比如: 最直接的方法: imgView.layer.cornerRadius1=110; imgView.clipsToBou ...
- iOS--基础控件总结一
UIWindow窗口 UIView视图 UIButten按钮 UILabel文本显示 UITextField输入框 UI TextView多行输入框 UISwitch开关 UISegmentedCon ...
- php判断json对象是否存在的方法
在实际测试中php读取json数组时 使用简单的 if 或者 array_key_exists 去判断对象是否存在是会报错的,以下是google搜寻的正确判断方法 实际上出现报错只是我对php还不是很 ...
- DBN 入门学习资料整理
建议按序阅读 1.Deep Learning 概述 Deep Learning(深度学习)学习笔记整理系列 : http://blog.csdn.net/zouxy09/article/details ...
- A session of Log Collect, Retrieval and Analysis using ELK Stack
Motivation 运维过程中对问题的定位往往需要跟踪和定位日志.分布式和弹性计算的引入,使得日志的定位和分析变得越发复杂. 本次实践主要的目的是考察现有成熟的日志收集.检索和分析方案:Kafka+ ...
- PP 创建BOM
转自 http://blog.csdn.net/u012369651/article/details/19190939 一.最终结果预览. 二.创建过程. 使用到的事务码 CS01 创建BOM CS0 ...