3

I have a VM setup in Azure (running Windows Server 2012 R2) with MySQL 5.7 installed. I am trying to access this using MySQL Workbench - which when running on the server works perfectly.

However, trying to use Workbench from my own PC is giving me there error "10060": Failed to connect to MySQL at *** with user @. Error 10060

I have also tried doing this using a PHP file in an Azure web app to connect, again not working.

I have set the following:

  • Azure Security Group, inbound port 3306 is open enter image description here
  • On the server the following inbound port rules have been applied: enter image description here
  • User is set to stackexchange@% (i.e. not localhost) enter image description here

Is there something I have missed? Do I need to allow the database to have remote connections?

Apologises if this is the wrong site. Wasn't sure if it was server related or related to the DB itself.

There is this tutorial by Microsoft but it uses the classic deployment model - not Resource Manager. And questions like this on here don't cover MySQL specifically.

  • 10060 seems to be "connection timeout" error, so firewall is most likely the cause of this. Also the bind-address setting of mysql should be set to something else that 127.0.0.1 or localhost. – redguy Apr 25 '16 at 15:20
  • Thanks, the IP address is set to the Public IP address of the machine, the article I linked to uses a domain name but that only applies to Classic model unfortunately. – tim.baker Apr 25 '16 at 15:22
  • See if this thread helps: forums.mysql.com/read.php?10,425695,425695 – Rick James Apr 26 '16 at 21:29
1

After a bit of head banging I have found that changing the bind-address on mysql to the ip address of the node connecting to mysql makes mysql refuse to restart

So instead set the bind-address = 0.0.0.0

Then let the firewall and mysql handle allowing the hsot.

Create a firewall rule on the mysql node like below:

mysql remove firewall rule

Then create a remote mysql user limiting the host to the internal/private ip address above.

0

In case anyone else comes across this, in the end I never resolved this issue properly. I ended up resorting to setting up a new VM in the classic model and using that instead - which was actually very easy.

  • Well that is pretty crap. – Stephen H May 18 '17 at 10:58
  • @StephenH I agree, however this was a while ago and I think they may have improved the new Resource Model VMs which may fix this – tim.baker May 18 '17 at 11:00
  • Yeah well after a search this it the best resource I could find azure.microsoft.com/en-us/blog/… and it is using a mysql service not a vm with mysql on it. – Stephen H May 18 '17 at 11:04
  • Ok I've found a solution – Stephen H May 18 '17 at 11:28

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.