使用sqlyog远程链接mysql错误2003 cant connect to mysql 解决办法

转自:http://www.2cto.com/database/201307/224401.htmlhtml


在阿里云上配置开发环境时,安装了MySql,想在其余客户端使用SQLyog远程访问,然而报错2003 cant connect to mysql...mysql

查了不少方法,赋予远程root权限、关闭本地防火墙等都试了,然而仍是链接失败。linux


后来看到这篇里的内容,sql

打开/etc/my.cnf 文件,bind-address = ******** 一句前边加上 # ,注释掉
 
再加上一下两句:
skip-external-locking
skip-name-resolve

不一样的是,我这边my.cnf在/etc/mysql/my.cnf中,使用一样的修改方法,重启mysql服务,发现链接成功了。

固然,以前服务器mysql中赋予权限的部分仍是要有的:@ref:http://www.linuxidc.com/Linux/2014-09/106892.htm

格式:grant 权限 on 数据库名.表名 to 用户@登陆主机 identified by "用户密码";数据库

grant select,update,insert,delete on *.* to komiles@123.4.56.89 identified by "komiles1234";服务器



 
?