Question
How do I use SSH to access MySQL remotely?
I am having difficulty accessing MySQL remotely.
I have tried accessing the database via MySQL Workbench (the “Standard TCP/IP over SSH” option) and phpMyAdmin. Both fail when I try to login.
I followed the ’how to secure MySQL’ tutorial to set up the database and my sense is some of the options enabled through the tutorial block remote access.. but I’m not sure exactly what is going on.
I have gone through other tutorials here on the topic but none have overcome this problem.
I can login and access the database locally using putty.
My VPS is running ubuntu and have Java, Tomcat and MySQL installed. I use my server to run a mobile android app. I have also installed fail2ban and I have set up IP tables.
Thanks
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.
×
If you are not able to access via phpMyadmin, then there is an issue somewhere, as phpMyadmin only needs localhost access.
However, if you can login using Putty..it should be working. I will do a quick walk through of Workbench connection using ssh: