Techminded

Allow remote connections for MySQL on Windows

So you are you able to connect your MySQL database on Windows ? You have two optioins.

1. Disable Firewall. Easy and popular way of solving problem for win users is to disable something but I do not recommend this to you

2. run cmd.exe and execute the following command:

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

This will add permitting firewall rule for MySQL that is almost everythig that is needed. Ah, and don't forget you should use '%' mask to match 'any host' or grant permission for every host is used to connect the particular database:

grant all privileges on somedatabase.* to 'someuser'@'%' identified by 'somepassword';
flush privileges;

And that's it.

Comments