Remote database connections are an essential requirement for many projects. However, on Cloudways servers, remote connections to MySQL are not allowed because of the inherent security risks to the servers and applications.

In order to allow MySQL database connections, you need to add the IP from which you wish to set up the connection. Please note if you are using MySQL over SSH, there is no need to whitelist your IP.

How to Whitelist IP Addresses for Remote MySQL Connections

Step 1: Go to Server Management

Log into the Cloudways Platform with your credentials. Click on “Servers” in the top menu bar. Then, click on your target server from the list.

Step 2: Whitelist Your IP and/or IP Subnets

  1. Next, go to the Security menu option in the left menu, and then click the MySQL tab.

  2. Add the IP address to the “Add IP to Whitelist” text area and click the “Add” button.

  3. If you have multiple IP addresses, repeat the process.

  4. Once you are done, click the “Save Changes” button to finalize the changes.

Now since you are done with whitelisting IP, please follow this KB to set up a remote MySQL database connection

Important Note

  • Cloudways offers several options to access the MySQL database, including a web-based database manager and SSH tunnel for MySQL clients.

That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?