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 ...
随机推荐
- git使用学习
windows系统需要安装git,mac系统自带git git相关命令: git clone https://git.coding.net/tenchina/wangteng_python1.git ...
- Tableview RefreashControl 下拉之后马上返回
Tableview RefreashControl 下拉之后马上返回 原因很简单: 我把 [self.tableView setContentInset:UIEdgeInsetsMake(0, 0, ...
- 遗传算法,实数编码的交叉操作之SBX(模拟二进制交叉)
本文主要介绍遗传算法(实数编码)的交叉操作中的SBX,模拟二进制交叉. 首先,给出个人用python2.7实现的代码,具体模块已上传到: https://github.com/guojun007/sb ...
- April Fools Day Contest 2014
April Fools Day Contest 2014 A.C.H三道题目 ============================================================= ...
- C++ CreateThread 实例
//ThreadBase.h#pragma once #include<windows.h> class CThreadBase { public: CThreadBase(void); ...
- 每瓶啤酒2元,2个空酒瓶或4个瓶盖可换1瓶啤酒。10元最多可喝多少瓶啤酒? php
//根据题意设定初始变量值//然后 一个while循环去操作//每换得一个瓶子,换的那个减去要做相应的数目//然后喝了啤酒后, 各数量加1//直到不符合要求.跳出循环 1 class Beer{ pr ...
- Linux 下编译安装MySQL
最近在研究Mysql,当然先要把它安装在机器上才行呀.记录下操作,加深记忆,也供以后参考. 准备工作: Linux版本:Redhat Linux 6.4 Mysql版本(安装包):mysql-5.6. ...
- 网页中插入视频(object)
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://down ...
- Codeforces Round #175 (Div. 2)
A. Slightly Decreasing Permutations 后\(k\)个倒序放前面,前\(n-k\)个顺序放后面. B. Find Marble 模拟. C. Building Perm ...
- [转]linux,windows 可执行文件(ELF、PE)
ELF (Executable Linkable Format)UNIX类操作系统中普遍采用的目标文件格式 . 首先要知道它有什么作用:工具接口标准委员会TIS已经将ELF作为运行在Intel32位架 ...