0

It is impossible to connect to mysql that I setup with phpmyadmin on a debian 8 VPS. I have been searching for hours, I have even followed this guide http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html but nothing, it seems imposible to get to connect to it, I even have created a phpmyadmin profile that is not on localhost and on %...

Thanks a lot for helping...

ZeDeathLord
  • 21
  • 1
  • 3
  • Do you have a user in the mysql database, that is allowed to connect to mysql from localhost/your ip? – Seb Nov 01 '16 at 16:36
  • Please show us the code you are using to open the connection. Have you checked that you can connect with the `mysql` client program? If not, then it's likely not a programming problem, and therefore off-topic for [so] - see the [help/on-topic]. – Toby Speight Nov 01 '16 at 16:56

1 Answers1

0

111 means connection refused, so make sure your mysql config is correct, and check your firewall.

Mysql config details (from Can't connect to MySQL server error 111):

If you have lines like this :

skip-networking
bind-address = 127.0.0.1

In your my.cnf configuration file, you should comment them (add a # at the beginning of the lines), and restart MySQL.

That's the first thing to try. Then try turning off any firewall and connecting again. That will tell you whether there's a firewall problem.

Community
  • 1
  • 1
Chris Lear
  • 6,592
  • 1
  • 18
  • 26
  • 1
    You can change the bind to `0.0.0.0` to open to everything, but that's not always enough. Turning off the firewall permanently is extremely risky, so be sure to turn it back on after. – tadman Nov 01 '16 at 16:48