How to Connect to the MySQL Database Remotely

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

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.

To learn more about adding a connection string to your Perl or PHP code using these configuration settings, please see the following article:

MySQL Connection Strings
Enable Your Computer as an Access Host

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.

When Using cPanel X3 Theme

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

About us

E:

We are a web development agency located in Cape Town, South Africa. We design great looking websites. We are CSS enthusiasts. We specialise in Content management systems. We are a professional Team with over 30 years of experience. Learn more.

facebook  linkedin  twitter  linkedin

Office South Africa

E: za [AT] raramuridesign [DOT] com
T:
 +27 21 913 7872
Mon - Fri 09h00-16h30 (ZA)