MySQL远程链接

当把本地数据库作为服务器的时候,如果你发现client无法链接到你的数据库服务器,那么有可能是:

1. 当前account没有远程链接权限,如何开通?

 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
 FLUSH PRIVILEGES;

2. 防火墙屏蔽了远程链接请求,怎么解决?

netsh advfirewall firewall add rule name="MySQL Server" action=allow protocol=TCP dir=in localport=3306

Reference:

http://stackoverflow.com/questions/21627421/mysql-unable-to-connect-with-remote-server

http://stackoverflow.com/questions/14779104/how-to-allow-remote-connection-to-mysql

 

posted @ 2016-09-14 22:51  beiyetengqing  阅读(161)  评论(0编辑  收藏  举报