I've installed MySQL 5.5 on a Microsoft Azure VPS (2012 Server). I created a user account, told it to allow any host and created an EndPoint on port 3306. I can remote into the VPS using RDP and connect locally just fine.

I also allowed the MySQL installer to create the needed firewall rules in Windows and it appears to be valid (allowing incoming TCP to port 3306).

What am I missing?

The error is "Can't connect to MySQL Server (4) 2003"

And, I can't seem to find the MySQL log files.

Also, this is a dump of my mysql.user table:

Host        User    Password
localhost   root    *0735EF2BBDF0D50FB780E9B58198D7260991E311   root    *0735EF2BBDF0D50FB780E9B58198D7260991E311
::1         root    *0735EF2BBDF0D50FB780E9B58198D7260991E311
%           cbmeeks *3CA067E806B5BB2DF87A89D517BBAF80DD22C27A

Neither cbmeeks or root work remotely.


3 Answers 3


You need to have Host specific entries in mysql.user table.

mysql> use mysql;
Database changed
mysql> select Host,User,Password from user;
| Host       | User | Password                                  |
| localhost  | root | *62395BB52702DE50773EBF629DD4AE90F07FFD94 |
| sgeorge-mn | root |                                           |
|  | root | *62395BB52702DE50773EBF629DD4AE90F07FFD94 |
| ::1        | root |                                           |
| localhost  |      |                                           |
| sgeorge-mn |      |                                           |
| localhost  | suku | *EAF5C8242B88A14545BB61062D64CA5207DD1A37 |
7 rows in set (0.01 sec)

So, follow me to create such a user with permission for remote access.

[ADDED] If you already have such a user, then try to follow the steps mentioned on me


I hate answering my own question but the solution was right in front of me. I made every logical attempt and finally discovered that it was indeed the Windows Firewall.

I KNEW that obviously blocking the port would prevent it from connecting remotely.

So that was the first place I looked. What I didn't catch, however, is that the inbound rule was set to "Domain". I set it to "Public" and it worked.

Not an expert on Windows Firewall rules but hopefully this will help someone.

Since I will be having an Azure VPS connect to another Azure VPS, it's probably worth mentioning that the firewall rule should be tweaked to only allow connections from the allowed VPS's. But that's a different topic. Hopefully this will help someone else out.

Thanks to @Suku for pointing me to the help page.

  • Same issue.. the installer automatically setup the domain rule, but did not allow public. May 7, 2013 at 17:15

I was having the same headache error (The error is "Can't connect to MySQL Server (4)) for about 3 weeks, finally i discovered that my problem was based on a firewall rule.

The solution was to ask to my hosting provider to open the port 3306 but in the OUT way.

Don´t try to expect as this is the big solution, because there are many things to be considered in configuration, but hey! i finally got it and it was all about the firewall of my provider.

Hope this help for someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.