How to connect to the MySQL database

Configuration Settings:

Host = localhost (really, put localhost)
Database name = (cpanelusername_databasename)
Database username = (cpanelusername_databaseusername)
Database password = (******)

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

Can I password protect directories?

To password protect directory: Note: At this time, cPanel can only protect directories, not...

phpMyAdmin

phpMyAdmin is a tool written in PHP to handle the administration of MySQL over the web. Databases...

Copy Entire Database or Rename Database

Is there a way for me to copy an entire database in cPanel? Go to cPanel > MySQL Databases...

How to import your MySQL database

How can I import a database? Go to phpMyAdmin Click the new database name in the top left...

Creating a URL redirect

WARNING Never create a redirect for domain.com to www.domain.com or from domain.com to...