sqlyog 2003错误代码。在连接centos虚拟机出现问题!!!

   

使用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
posted @ 2021-05-20 16:43  程序媛Nancy  阅读(1313)  评论(0)    收藏  举报