Home > front end >  Connect to azure Mysql server
Connect to azure Mysql server

Time:11-05

I'm trying to connect to a Mysql server on Azure via MySQL Workbench.

I get an error:

Your connection attempt failed for user 'My_Username' to the MySQL Server at 13.93.84.xx:3306: Unable to connect to localhost

How can this be localhost while I have a full ip address with port?

  • I checked the Ip address and copied it from the Azure portal.
  • I added an inbound rule to allow mysql connections for my ip address

Thanks for help!

CodePudding user response:

It looks like there are a lot of causes of this error.

Error signifies : Check that a MySQL server is operating, that network connections are enabled, and that the network port you selected matches the server's configuration.

As you said you have the IP address and have added an inbound rule to allow MySQL connections ,if server was set to only allow connections from localhost, which was the culprit in my situation.

bind-address = 127.0.0.1

To

bind-address = 0.0.0.0

This allows connections from any IP, not just 127.0.0.1

There could be various instances which has a fairly extensive list, here- Causes of Access-Denied Errors.

  • Related