【mysql】用navicat连接虚拟机mysql出现错误代码(10038)
生活随笔
收集整理的這篇文章主要介紹了
【mysql】用navicat连接虚拟机mysql出现错误代码(10038)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
來(lái)源:
http://www.cnblogs.com/ohmydenzi/p/5521121.html
http://blog.csdn.net/chana1101/article/details/39641415
錯(cuò)誤信息: 2003-Can't connect to MySQL server on 'xxxxx'(10038)
1.在windows下,cmd 輸入
telnet 192.168.xx.xxx 3306
其中ip是虛擬機(jī)的ip.如果連接失敗
2.在虛擬機(jī)下輸入
netstat -anp| grep 3306
看結(jié)果,如果結(jié)果中3306前面的ip不是0.0.0.0
3.修改/etc/mysql/mysql.conf.d/mysqld.cnf
把 bind-address = 127.0.0.1 改為 bind-address = 0.0.0.0
上面的意思是改為監(jiān)聽(tīng)所有地址
4.對(duì)于普通用戶,添加權(quán)限
mysql>grant all privileges on *.* to 'root'@'%' identified by 'youpassword' with grant option; mysql>flush privileges;
總結(jié)
以上是生活随笔為你收集整理的【mysql】用navicat连接虚拟机mysql出现错误代码(10038)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Report not added to
- 下一篇: SAP CRM WebClient UI