Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
127.0.0.1   root    *0735EF2BBDF0D50FB780E9B58198D7260991E311
::1         root    *0735EF2BBDF0D50FB780E9B58198D7260991E311
%           cbmeeks *3CA067E806B5BB2DF87A89D517BBAF80DD22C27A

Neither cbmeeks or root work remotely.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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 |                                           |
| 127.0.0.1  | 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

share|improve this answer
    
Please see my edit above. I already have what you are talking about. –  cbmeeks Jan 4 '13 at 12:27
1  
Can you try to follow what these people are saying on dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html –  Suku Jan 4 '13 at 12:32

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.

share|improve this answer
    
Same issue.. the installer automatically setup the domain rule, but did not allow public. –  JohnFly May 7 '13 at 17:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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