Introducing Cloudways Community Forum. Start Discussions and Get Instant Help From Cloudways Community. JOIN NOW

How to Setup Remote Connection To Your MySQL DatabaseDecember 29, 2017


In this KB:

  • Get Database Credentials
  • Establish Remote Connection Using MySQL Client
  • Test the Connection


Remote MySQL connections are an essential feature of many projects. Many users prefer to use a MySQL client to set up the connection.

This KB describes the process of setting up remote connections to MySQL on your server using a MySQL client.

For the purpose of this KB, we will use MySQL Workbench. However, you are free to use any MySQL client of your choice.

Note: Before setting up these connections, you first need to add your IP  and/or IP subnets to the whitelist. Please follow this KB article for whitelisting your IPs.

Set up Remote MySQL Database Connections

Once the IP address is whitelisted, you could use it to set up remote connections to the MySQL database.

Step 1: Get Database Access Credentials

You need to have database access credentials and the IP of the server that hosts the MySQL database. For this go to Applications > Application Details. Copy the database credentials (username and password) and the server’s IP address.


Step 2: Establish Remote Direct Connection Using MySQL Client

Launch the MySQL client and set up a new connection. Enter the following information in the relevant fields:

Connection Name: You could use any name for your connection.

Hostname: Enter the IP address of the server that host the MySQL database.

Username: Enter the username.

Next to the Password, click the “Store in Vault” button and enter the password.


Step 3: Test the Connection

Once you have entered all the information, click the “Test Connection” button to check the connection. You will see the following success message:


You now have a working connection to your MySQL database from a remote IP address.

Important Note:

  • Cloudways offers several options to access MySQL database, including web-based database manager and SSH tunnel for MySQL clients.
Have Questions? Ask From Our Helpful Community

Comments are closed.

Still need help? Our support team is waiting to help you. Ask them now