使用sqlyog遠程連接
mysql錯誤2003 cant connect to mysql 解決方法
1.確保mysql服務已經啟動:
service mysqld start
2.在裝有sqlyog的端嘗試在命令行中ping目標ip,確保能ping通
3.在需要連接的服務器端查看mysql用戶名和權限,確保sqlyog輸入的用戶名和密碼正確
4.在需要連接的服務器端查看用戶權限:
show grants; 如果只有Grants forroot@localhost 一行的話:
重置密碼mysql>
set
password
for
'root'
@
'172.16.124.1'
=
password
(
'coship'
);
mysql> flush
privileges
;
5.記得關閉VMware的防火牆, 每次重啟linus系統防火牆都會打開。一定記得關閉防火牆
service firewalld stop
6.打開/etc/my.cnf 文件,bind-address = ******** 一句前邊加上 # ,注釋掉
再加上一下兩句:
skip-external-locking
skip-
name
-resolve
7.很重要的一步!!!重啟mysql:
service mysqld restart
8.查看mysql服務狀態
service mysqld status
9.也可以查看mysql的進程
ps -ef|grep mysqld