I’ve tried everything!
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-remote-database-to-optimize-site-performance-with-mysql https://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html https://www.digitalocean.com/community/questions/how-to-allow-remote-mysql-database-connection https://www.digitalocean.com/community/questions/unable-to-connect-to-remote-mysql-server
Please help!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey friend!
Let’s simplify all of this a bit with a theoretical scenario:
On server 1.1.1.1 I make sure that bind-interface is set to 0.0.0.0. I check this with “netstat -tulpn” to make sure MySQL isn’t just listening on 127.0.0.1. If it is, then I haven’t set bind-address, and need to work on that before continuing. Otherwise, I continue by running this in MySQL shell on 1.1.1.1:
create database digitalocean;
Then:
grant all on digitalocean.* to 'jarland'@'2.2.2.2' identified by 'mypassword';
Now on 2.2.2.2 I run:
mysql -h 1.1.1.1 -u jarland -pmypassword digitalocean
Then I should have a MySQL shell. If I don’t, and no firewall is blocking port 3306 outbound on 2.2.2.2 or inbound on 1.1.1.1, I didn’t do one of the above steps.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.