How to allow MySQL on Windows Server for external remote access?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 03:56:10

If you can't connect to the server remotely, but you can connect locally, you either need to open port 3306 in the firewall, or grant the user permissions from the remote IP.

The port should be opened in the windows firewall, as well as the router firewall. Your router will need to forward the port to the 2008R2 server.

To open ports in 2008R2 firewall:

http://www.2x.com/blog/2010/04/tech/configuring-the-windows-server-2008-r2-firewall-to-open-ports-for-2x-solutions/

To grant user permissions on IP:

GRANT ALL ON foo.* TO bar@'255.255.255.255' IDENTIFIED BY 'PASSWORD';

Keep in mind that it is possible to have duplicate usernames in MySQL, and if you didn't create the new user with a UNIQUE username then you may be getting the privileges of the user jailed to localhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!