Webserver can't connect to Remote Database using Private IP
I’m trying to connect my web server (planning to run Wordpress) to my remote database server on a private network, both hosted on Digital Ocean.
I’m currently using Runcloud.io to install LEMP on my servers.
The issue I’m facing is, I can get private networking running fine:
- I can ping my DB server’s private IP
nc -zv private_ip 3306is successful
mysql -u username -p -h public_ipis successful
Yet when I try connect to mysql (from my web server) using my private ip, I get the following output:
ERROR 1130 (HY000): Host 'webserver_private_ip' is not allowed to connect to this MariaDB server
I set up my private networking using this guide: https://www.digitalocean.com/community/tutorials/how-to-enable-digitalocean-private-networking-on-existing-droplets
Any help in this is greatly appreciated