Rumah  >  Artikel  >  pangkalan data  >  使用mysql workbench遇到secure_auth问题

使用mysql workbench遇到secure_auth问题

WBOY
WBOYasal
2016-06-07 16:41:482316semak imbas

在windows操作系统下,我直接下载压缩包来进行使用,在配置连接的时候,先后出现了两个问题 1、ERROR 2003 (HY000): Cant connect to MySQL server on 192.168.15.135 (10060) 2、Warning: mysql_connect(): Connection using old (pre-4.1.1) authenticatio

在windows操作系统下,我直接下载压缩包来进行使用,在配置连接的时候,先后出现了两个问题

1、ERROR 2003 (HY000): Can’t connect to MySQL server on ’192.168.15.135′ (10060)

2、Warning: mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused (client option ‘secure_auth’ enabled)

问题1解决步骤:

1、核查系统中mysql服务是否启动,可以通过ps -ef | grep mysql,同时最好查下端口是否为默认端口

2、核查权限是否授予正确,通过show grants for ‘liufofu’@’192.168.10.27′进行检查,发现不存在问题

3、核查系统中防火墙是否有所限制,本次问题出现就在防火墙上,可以先关闭防火墙测试。后续添加相应的规则

问题2解决步骤:

1、核查系统表user中的密码是否为16为的短密码,select user,host,password from mysql.user where user=’liufofu’;

2、确认是短密码后,调整old_passwords变量,我所用在系统为了兼容之前的系统开启这个变量,若业务上不需要的话,可在my.cnf中关闭这个变量。

3、关闭后,要修改mysql.user中的所对应liufofu的password为长密码格式

update mysql.user set password =password(‘xxx’) where user=’liufofu’ and host=’192.168.10.27′;

这个操作后,别忘记刷新权限,执行flush privileges;

到此mysql workflow已经顺利连接上了。

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn