Remotely Connect to a Databases

Configuring a Remote MySQL Database

1. Log in to your cPanel account.

2. Navigate to the Database section and click on Remote MySQL® .

 

In the Add Access Host box, you need to enter each individual IP Address and click on Add Host. You can get your own IP address at ip4.me. If your web developer is the person who requires access, ask them to visit that URL and to provide you with their own IP address.

 

Bellow this section you will see a list with all the added access hosts (or IPs). You can also remove IP addresses, if needed.

Another interesting feature is the possibility to add the “%” wildcard. This allows you to add an entire IP range to the access hosts list. While it may seem like an easy “fix”, the usage of the % is not advisable, as it presents some security risks.

 

How to connect remotely to MySQL Database using MySQL Workbench

MySQL Workbench is a visual tool for database architects and developers. MySQL Workbench provides data modeling, SQL development, and comprehensive database administration tools, and much more. MySQL Workbench is available on Windows, Linux, and Mac OS X. You can download it here.

Once MySQL Workbench is installed, please follow the steps below to connect to your database:

  1. Open MySQL Workbench.
  2. Click New Connection towards the bottom left of MySQL Workbench.
  3. In the “Set up a New Connection Dialogue” box, Type your Database connection credentials. The credentials will be like the following:Connection Name: You can name this whatever you like.
    Connection Method: Standard (TCP/IP).
    Hostname: You can use your domain our your server’s IP address.
    Port: 3306
    Username: the user you created for the database.
    Password: the password for the database user that was created.
    Default Schema: This can be left blank.
  4. Click Test Connection.
  5. Type your password and click the “Save Password in Vault” checkbox. Click Ok.
  6. MySQL Workbench should say “Connection parameters are correct“. Click Ok.
  7. Click Ok again to accept the connection settings.
  8. Now under the SQL Development section, you will see your connection listed in the Open Connection to Start Querying box. Click your newly created account.
  9. Now you will see the databases list in the area on the left.

That’s all! Now you know how to connect remotely to your MySQL database.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What version of mySQL are you running?

Login to your control panel. On the left side under "Server Info" it tells the mysql version

Restoring a mysql database via SSH

In order to restore your database via SSH or Telnet you will require 2 things:1. SSH or Telnet...

MS SQL Server - Installation

MS SQL Server - InstallationSQL Server supports two types of installation    1. Standalone    2....

How to Backup & Restore a MySQL Database

How to backup Mysql Database.   First, log in to your cPanel using your username and password....

Insert data into your database

Once you have your MySQL database, you can use the phpMyAdmin and insert data into your...