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 ...
随机推荐
- MINIX3
这个系列minix3是好早看的源码 现在都忘记的差不多了 觉得就此扔掉可惜了 今天把他全部放在博客上 1 是想和大家一起讨论下 2 是没事看看 能够加强对一个稳定性系统的理解 加厚
- 折腾域名的dns
最近,购买域名的时候遇到了几个概念,刚开始不是很懂,最后都是直接找客服给我改好的,现在小结一下帮助理解. DNS域名管理是按后缀进行分组的,比如.com域名,作为最早的商用域名,有很高的推广价值.再比 ...
- download github files
想要下载github的文件,但是却发现无从下手.发现一个网站DownGit,非常方便,只要贴一下链接即可: https://minhaskamal.github.io/DownGit/#/home
- KANO模型
一.满意度的定义 消费者的满意度是取决于他们对企业所提供的产品和服务的事前期待,与实际(感知)效果之间的比较后,用户形成的开心或失望的感觉.就是说,如果购后在实际消费中的实际效果与事前期待相符合,则感 ...
- Lua Coroutine详解
协同程序与线程差不多,也就是一条执行序列,拥有自己独立的栈,局部变量和指令指针,同时又与其它协同程序共享全局变量和其它大部分东西.线程与协同程序的主要区别在于,一个具有多线程的程序可以同时运行几个线程 ...
- eclipse 配置c++
安装mingw一直安装不成功 用TDM-GCC方便多了 附链接http://tdm-gcc.tdragon.net/
- c语言数据结构之 快速排序
编译器:VS2013 #include "stdafx.h"#include<stdlib.h> //函数声明 void QuickSort(int a[],int n ...
- ubuntu 配置vim(vimrc)
打开终端:ctrl+alt+t 进入vim文件:cd /etc/vim 打开vimrc文件:sudo gedit vimrc 然后在行末if语句前加上下面的内容," 这个符号为注释,后面内 ...
- paramiko 登录linux主机后执行tail后返回数据不完整解决方法。
def get_sql_log(host,port,user,password,key_words,out_put_filename): commond='cd crm-app/;./tailall. ...
- php 以IP的形式获取访问者的地理位置
<?php header('Content-Type:text/html;charset=utf-8'); function getIPLoc_sina($queryIP){ $url = 'h ...