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