Search code examples
mysqlwindowsremote-connectionlaragon

Can`t connect to myql from my local machine to remote server 10060


I have a windows server and I use laragon on my local machine and HeidiSql as an interface

What I want to achieve:

I want to connect from my computer to Windows server and connect to Mysql database.

What have I tried:

1.I have granted permissions to mysql user(on Windows server) to connect from anywhere using this: GRANT ALL PRIVILEGES ON *.* TO 'mysql_user'@'%' IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;

2.I have found my.ini file on Windows server and set bind-address = 0.0.0.0

3.I have made an Inbound rule on windows server firewall to allow port 3306

After all this I got an error:

ERROR 2003 (HY000): Can't connect to MySQL server on 'XX.XX.XX.XX' (10060)

Still can`t connect.... I have googled for this for many hours and as far as I understand that this means that I am still not allowed to connect?

I have also tried to set bind-address=windows-server-IP on the Windows server itself as suggested on some forums.

I have really ran out of options. All forums suggests all the steps above but it just doesn`t work. Any help would be much appreciated.


Solution

  • Before anyone else spends countless hours trying to figure this out I found a solution. It turns out it has nothing to do with user permissions and firewall. I had to allow port 3306 from host and only then it is about the permissions and firewall.