By longsookeat
I had setup another instance only for MySQL server.
This is overall what I did to setup my remote access for MySQL:
vi /etc/my.cnf
[mysqld]
bind-address=SQL-SERVER-IP
# skip-networking
/etc/init.d/mysql restart
sudo ufw allow 3306/tcp
sudo ufw allow 3306
sudo ufw allow 8080/tcp
sudo ufw allow 8080
sudo service ufw restart
mysql -u root -p mysql
GRANT ALL ON foo.* TO root@'SECOND-INSTANCE-SERVER-IP' IDENTIFIED BY 'PASSWORD';
Query OK, 0 rows affected, 1 warning (0.00 sec)
exit
mysql -u root -h 'SECOND-INSTANCE-SERVER-IP' -p
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘SECOND-INSTANCE-SERVER-IP’ (110)
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!
i granted permissions for all
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘XXX.XXX.XXX.XXX’ (113)
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.