How to connect to the MySQL Database

Configuration Settings:

Host name = localhost (literally put localhost)
Database name = (cpanelUsername_databaseName)
Database username = (cpanelUsername_databaseUsername)
Database password = (whatever you picked)

WordPress Example: User name = joe1337 , Database name = wrdp1 , Database-user name = wp1 , Database-user password = eHTb7%Pxa9

 

// ** MySQL Settings ** //
/** The name of the database for WordPress */
define('DB_NAME', 'joe1337_wrdp1');

/** MySQL database username */
define('DB_USER', 'joe1337_wp1');

/** MySQL database password */
define('DB_PASSWORD', 'eHTb7%Pxa9');

/** MySQL hostname */
define('DB_HOST', 'localhost');

 

Note: When you move databases to our servers, the database name and username may change. This change must be updated in your script code. (The database name and username is clearly displayed in cPanel, in the MySQL area.)

On shared servers, the database user name cannot be changed to something without the cPanel user name in it.

It is possible for someone to use their cPanel username and password to connect to the database. However, we NEVER recommend doing this because the first time you change or reset your cPanel password, then your databases will stop working.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Monitor the servers's status

This can be done in cPanel, in the left hand menu. Scroll to the bottom and find the link for...

What are my nameservers

Not sure what the names servers are for your website's domain name? Kindly refer to the welcome...

How do I add another domain to my Account?

Some DT shared Linux web hosting plans allow you host multiple domains on the same account. To...

How do I manage my Shared hosting account?

We offer cPanel to manage your Shared Web Hosting account. You can learn more about cPanel here

How Do I Create and Remove an Addon Domain?

An addon domain is a fully functional domain that can be created from within your control panel....