Home > Database > Mysql Tutorial > body text

使用sqlyog远程连接mysql错误2003 cant connect to mysql 10060/_MySQL

WBOY
Release: 2016-06-01 13:32:26
Original
2773 people have browsed it

bitsCN.com

使用sqlyog远程连接mysql错误2003 cant connect to mysql 10060/10061解决方法

 

网上关于这个问题的帖子实在不少,不过解决方法各有不同,让人实在摸不着头脑,现在小弟做个总结。

 

1.确保mysql服务已经启动:

 service mysql start
Copy after login

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;
Copy after login

5.记得关闭VMware的防火墙

6.打开/etc/my.cnf 文件,bind-address = ******** 一句前边加上 # ,注释掉

再加上一下两句:

skip-external-lockingskip-name-resolve
Copy after login

 

 

7.很重要的一步!!!重启mysql: service mysql restart         我当时就是尝试了100种网上的方法,结果最后才发现还忘了restart,怪不得老连不上~~~

 

如果你也遇到同样的错误,不妨把七步全都试试,一定能解决(*^__^*)

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!