Working with SQL databases

In order for your MySQL database to work as intended, it will need a script calling or querying the database for the information it stores. In order to do this, you must connect your script to the database with a configuration file.

If you are not sure where your configuration file is, check this list of different scripts to find its location:

Configuration Settings

Database driven scripts, such as Wordpress, WHMCS and Joomla, will generally have a default configuration file ready for you to edit with the appropriate information. Below you will find examples of what this access information will look like:

Host Name = localhost (literally input localhost)
Database Name = cpanelUsername_databaseName
Database Username = cpanelUsername_databaseUsername
Database Password = whatever you selected

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');
  • 18 Users Found This Useful
Was this answer helpful?

Related Articles

What is Parked domain?

Parked or Alias domain is a domain that is connected to your hosting and leads to the same site...

What is Subdomain?

It is not always necessary to register a new domain name when the one you already own will work...

What is Addon domain?

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

How to Log into cPanel

cPanel Access You can access your cPanel in any of the following ways: Option 1: If you are...

Where should I upload site for Addon domain?

After you add the Addon domain to your hosting package, you can upload the site files to Document...