2003-Cant`t connect to Mysql server to xxxxxxx
解決:
vim /etc/mysql/my.cnf
修改bind-address ? ? ? ? ? ?= 0.0.0.0
然后重啟mysql:
這時進入mysql可能會報錯:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
只需重啟系統就好了?
此時再次使用navicat連接:
再次出現問題:1045-Access denied for user 'root'@xxxxxx(using password:YES)
表示沒有權限,在mysql 命令行下輸入:
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'your passwd'; ? ? ?注:這里的%表示多有機器
然后再使用navicat 連接就可以了
?