How to access your Database Remotely on a cPanel Hosting

First of all, it is important to explain how the database/database user names are formed. The names consist two parts — your cPanel username and the actual database/username name. For example — if your username is “user” and if you named your database “databasename” you should use:

user_databasename
Same for database username:

user_username
So, if you would like to access your database remotely you should add your IP to remote hosts list firs. This could be done via your cPanel -> MySQL database. You will see on the bottom of your page the Access Hosts section.
 
You can see your IP at https://www.whatismyip.com. If you have the dynamic IP address you can add % instead which will allow connections from every IP.

To add a group of servers or an IP range you can use:


%.domain.com or 192.168.1.% for example.

As soon as you have your IP added you can access your database using the following information:

MySQL host: your domain name or the server hostname/IP address

MySQL port: 3306 ( 99% chance to be 3306)

MySQL database: user_databasename

MySQL name: user_databaseuser

MySQL password: the password for the database applied for the user.

If you do not know the user and the password for your database you can always add a new one. This could be done via your cPanel -> MySQL database. Simply create a new user under the Current Users section and add it to the desired database with all privileges.





  • 0 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

Difference between cPanel and WHM

  cPanel is designed for managing separate hosting accounts on the server. It is an online...

Create an Email Account in a cPanel Server

To Set Up Email Accounts 1. First, log in to your control panel. 2. Click on Email Accounts...

How to backup via cPanel.

How To Create And Restore Backups In CPanel cPanel provides a very simple yet powerful tool for...

Update contact Information in cPanel

cPanel has its own settings regarding a user’s contact information and user notification. By...

How to access Webmail

Webmail is an email system that can be accessed via any web browser when connected to the...