How to connect to MySQL remotely

Posted October 22, 2015 47.3k views
MySQLConfiguration Management

I tried to connect to MySQL remotely (I need to go without SSH).

Commented bind-address with #.

Getting MySQL said: Access denied for user ‘root’@'myremoteip’ (using password: YES)

How can I connect? Searched internet. Found that I should run “`GRANT ALL PRIVILEGES ON . TO 'root’@’%’ IDENTIFIED BY 'PASSWORD’ with grant option; FLUSH PRIVILEGES;

it is not working for me. How can I achieve that?

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.

Submit an Answer
2 answers

@simPod - The URI below provides a more in-depth and complete guide on how to setup a remote MySQL server. Ideally, you want to bind to an IP (as shown in the guide) – preferably the private IP provided with your Droplet, and then setup restrictions to limit access to only IP’s that you’ve white-listed.

by Justin Ellingwood
When your site begins to get more visitors, you may have to think about how to handle the additional traffic. One easy way of doing this is to separate your database operations from your web server so that each can handle its own load. In this guide, we'll demonstrate how to do this for a WordPress site built on Nginx by configuring a remote MySQL database.

the tutorials of digitalocean for remote connection to mysql do not work, because they do not want to connect, better consult the tutorials of linode.