Many websites and applications need a MySQL database to store information. WordPress, for example, uses a database to store posts, pages, users, settings and other website data.
If you need to create a new database manually on your Cheap Host cPanel account, you can do this using the MySQL Databases section in cPanel.
Log in to your Cheap Host cPanel account.
Go to the Databases section.
Click MySQL Databases.
Under Create New Database, enter a name for your database.
cPanel normally adds your account username as a prefix to the database name.
For example, if your cPanel username is:
example
and you create a database called:
wordpress
the full database name may become:
example_wordpress
Make a note of the full database name, as you may need it when configuring your website or application.
The next step is to create a MySQL user that can access the database.
Scroll down to the MySQL Users section.
You can also use cPanel's password generator to create a strong random password.
Make sure you save the username and password somewhere secure if you will need to enter them into an application later.
Creating a database and creating a user are separate steps.
You must also give the user permission to access the database.
Under Add User To Database:
You will then be asked which permissions the user should have.
For most website applications, including WordPress, select:
ALL PRIVILEGES
Then click Make Changes.
The user should now have permission to access and modify the database.
When installing an application manually, you will usually need the following information:
On most Cheap Host cPanel accounts, the database host will normally be:
localhost
Your software may refer to these as MySQL credentials or database connection details.
If you are configuring WordPress manually, its database settings are stored in:
wp-config.php
This file contains values such as:
DB_NAME
DB_USER
DB_PASSWORD
DB_HOST
Take care when editing this file, as incorrect details can prevent WordPress from connecting to its database.
If your website reports an error such as:
Error establishing a database connection
check the following:
A surprisingly common issue is creating both the database and user but forgetting to add the user to the database.
Deleting a MySQL database can permanently remove website data, so always make sure you have a backup before deleting or replacing an existing database.
If you are unsure which database belongs to your website, please contact Cheap Host support before making changes.