Loading...

Knowledge Base
Hosting Ad
 Up to 70% off  on  WordPress  hosting for WordPress Websites and Stores!
Categories:

How to Remotely Connect to a MySQL Database

Share

Remote database connection permits MySQL databases hosted on your account to be accessed by servers located remotely. This feature in cPanel comes in handy when you want other servers to be able to access your databases.

Note: If connecting from your home computer, you need a MySQL client like Navicat, phpMyAdmin, Workbench, or Dreamweaver.



Remote MySQL Database Connection in cPanel

Configuration Settings

Use the following configuration settings for connecting to your database:

  • Host name - (use the server IP address)
  • Database name - (cpanelUsername_databaseName)
  • Database username - (cpanelUsername_databaseUsername)
  • Database password - (the password you entered for that database user)
  • MySQL Connection Port - 3306
  • TCP or UDP - either is fine

Remote MySQL Connection

To enable remote MySQL connection, the connecting computer must be added as an Access Host. Follow these steps:

  1. Log into cPanel and click the Remote MySQL icon under Databases.
    Remote MySQL icon under Databases
  2. Type in the connecting IP address under Host and click the Add Host button.
    Fields to add host
    You should now be able to connect remotely to your database.

Remove Remote Access Host

To remove a host from accessing databases on your server:

  1. Under Manage Access Hosts, click the trash icon next to the IP address you want to remove.
    Trash icons under Remove column
  2. If you are sure you wish to prevent the server from accessing your databases, click Remove Access Host.

Note: Having a dynamic IP address means that the connecting IP address can change periodically depending on the Internet Service Provider (ISP). You must update the connecting IP in Remote MySQL every time it changes.

Database Management

After whitelisting the IP to allow remote connection, you should be able to make the proper remote MySQL connection with the database's name and user found on cPanel's MySQL Databases page. The most common problem in connecting is due to an incorrect username and/or password. Please ensure the username you use matches the username created in the "MySQL Database" section of your cPanel. For examples of MySQL errors, please see the related article: MySQL Errors.

You will need a third-party application to access MySQL remotely. Some are free, and some cost money.

Summary

To ensure easy access to your MySQL databases, you can set up a remote database connection on your account. This guide outlines all the necessary configuration settings that you may need. Additionally, you can find helpful tips for troubleshooting any common connection problems by visiting the articles linked.

If you haven't created your databases, you can read our easy guide on creating and deleting MySQL. We'll help you get started right away.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

 
* Your feedback is too short

Loading...