How to Connect to the MySQL Database

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

How to log into cPanel

cPanel is used for managing your web hosting account and available on all Webbyklet Linux...

How do I use shared SSL to access cPanel ?

Use https and our IP address, followed by the secure port number:...

How do I create and remove an Addon Domain?

An addon domain is a secondary domain hosted on a cPanel account. Addon domains typically have...

How to change DNS zones (MX, CNAME, and A records)

  Shared: With cPanel 11.25, you now have access to make some of these changes. Note: This...

How to change the password of your cPanel account

There may be times where you would like to change the password of your account. It is...