All Collections
How do I connect to my MySQL?
How do I connect to my MySQL?
Fredrik Björklund avatar
Written by Fredrik Björklund
Updated over a week ago

Database-driven scripts, such as Wordpress, WHMCS, and Joomla, usually have a standard configuration file that you can edit with appropriate information.

Below you will find examples of what this access to information will look like:

Hostname = localhost (literally input localhost)

Database Name = cpanelUsername_databaseName

Database Username = cpanelUsername_databaseUsername

Database Password = whatever you have chosen

Wordpress Example:

Username = joe1337

Database Name = wrdp1

Database Username = 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');

Even though it is possible to connect to the database with your cPanel username and password, we do not recommend it. Every time you change or reset your cPanel password, the databases will stop working until the configuration files are updated.

Did this answer your question?