How to connect to MySQL remotely

October 22, 2015 7.3k views
MySQL Configuration 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?
1 Answer

@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.
Have another answer? Share your knowledge.