Question

Remote access to MySQL not working after following a ton of tutorials. What am I missing?

I’ve changed bind-address to 0.0.0.0 and today changed it to the IP of my server which still doesn’t work. The MySQL user I’m trying to connect with has host set as % and I’ve of course restarted MySQL a bunch of times. To test if the connection works I’m using XAMPP for windows and running “mysql -h SERVERIP -u user -p” to see if I can connect which it cannot. (Error 10060)

Subscribe
Share

Your welcome,

Please listen to mine and @Woet advice though and don’t do this.

MySQL is not going to be secured.

Thank you so much! This solved it.

That will be it,

The default is to deny all incoming. And you don’t have a rule for MySQL Port 3306.

sudo ufw allow 3306/tcp
sudo service ufw restart

Please note this is not adviced to open MySQL to the whole internet. If you need this and can, you could limit to a fixed IP on the firewall

Have you checked if you have a firewall running

For example in Ubuntu you can run

sudo ufw status verbose

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

MySQL is a plaintext protocol, do not expose it to the internet and use it over a SSH tunnel instead.