Knowledgebase

How to Connect to the MySQL Database Remotely in cPanel?  Print this Article

Connect to the MySQL Database Remotely in cPanel:

Allowing remote MySQL connections is often done to enable a program on your personal computer to access a database on the server.

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


Configuration Settings:

Use the following configuration settings for connecting to your database:

  1. Host name = (use the server IP address)
  2. Database name = (cPanelUsername_databaseName)
  3. Database username = (cPanelUsername_databaseUsername)
  4. Database password = (the password you entered for that database user)
  5. MySQL Connection Port = 3306
  6. TCP or UDP, either is fine.

By default, all IPs are blocked and must be added to an access list in order to access the server. So, before connecting to MySQL from another computer, the connecting computer must be enabled as an Access Host.

 

If you do not know your IP address, find it by going to http://www.websupporters.com/tools/ip/

 

Dynamic IP Addresses:

 

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.

 

Many of our servers block port 3306 inbound. If you are getting a "Connection Refused" error when trying to connect, please create a ticket requesting that we open port 3306 for your IP to be able to connect to MySQL remotely.

 

When Using cPanel X3 Theme:

 

  1. Log into cPanel.
  2. Under Databases, click the Remote MySQL icon.
  3. In the Host field, type in the connecting IP address.
  4. Click Add Host.
  5. You should now be able to connect remotely to your database.

 

When Using cPanel X Theme:

 

  1. Log into cPanel.
  2. Under Databases, click the MySQL Databases icon.
  3. Scroll all the way to the bottom and type in the connecting IP address in the Host field.
  4. Click Add Host.


You should now be able to connect remotely to your database.

Was this answer helpful?

Also Read

What is a Subdomain? How Do I Create and Delete One in cPanel?
Create and Delete subdomain in cPanel: It is not always necessary to register a new domain name...
How Do I Create a MySQL Database, a User, and Then Delete if Needed in cPanel?
Create a MySQL Database, a User, and Then Delete if Needed in cPane: Databases offer a method...
Local, Backup and Remote Mail Exchanger
This is a setting that tells WebSupporters how to handle your incoming emails. We recommend using...
How to Log into cPanel?
Log into cPanel: cPanel is a web hosting account management tool available on all WebSupporters...
How to Upload a File using the File Manager in cPanel?
Upload a File using the File Manager in cPanel: You can upload your files directly through...