0

I am trying to configure my server to allow remote connections.

From what I understand I need to uncomment bind-address 127.0.0.1 in the my.cnf file, then restart mysql.

That hasn't worked.

I have also tried changing it to bind-address 0.0.0.0.

That hasn't worked either.

When I try to remotely connect using SQLpro, I get the following error:

MySQL said: Can't connect to MySQL server on '54.444.33.4' (4)

Can anybody offer any other solutions?

Thanks.

4
  • log sould tell you whether mysql listens on this ip. you could also check this with netstat -an | grep 3306
    – drookie
    Nov 13 '14 at 17:17
  • firewall rules?
    – thanasisk
    Nov 13 '14 at 17:20
  • 3306 tcp 0.0.0.0/0, 85.33.93.54/32
    – richelliot
    Nov 13 '14 at 17:31
  • Does the user you're trying to connect with have grants from that IP? Or including that IP, if wildcarded? Nov 18 '14 at 11:39
0

You need to bind MySQL to the IP on which it should be reachable.

bind-address = 192.168.1.50

Then you connect to this address

mysql -p -u someUser -h 192.168.1.50

Hope this was helpful.

2
  • But would this mean that localhost would no longer be able to connect it its own database?
    – richelliot
    Nov 13 '14 at 17:30
  • Hi. I tried it out & it works just fine. Mind you can of course use bind-address = all which is the same as bind-address = 0.0.0.0 Nov 13 '14 at 19:33

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.