How to create a MySQL Database

MySQL is a relational database management system (RDBMS) that allows applications like WordPress, Drupal, and Joomla to function. Without a properly configured database, these applications cannot store or retrieve data, leading to errors like “Error establishing a database connection.”

Create a MySQL Database in cPanel

Within cPanel, you can create a MySQL database using the MySQL Database Wizard for a beginner-friendly setup or manually for more control. Plesk also offers similar functionality with additional features for managing multiple databases.

Create a database using the Wizard

1. Firstly, if you want to use the MySQL Wizard, login to your cPanel control panel, from here you can select the “MySQL® Database Wizard” in the “Databases” section.

cPanel MySQL Wizard
cPanel MySQL Wizard

2. Once you have clicked the wizard, enter a name for your database. However, notice that the prefix is already set and cannot be changed.

Create a new database with the cPanel MySQL Wizard
Create a new database

3. Enter a username and password for your database user. Similarly, you can see that the username prefix is already set and cannot be changed.

Creating a database user with the cPanel  the MySQL Wizard
Create a database user

4. To secure the account we recommend using the password generator. This is because the generator creates a unique password.

cPanel Password Generator

5. Now you have made a user, you need to assign permissions. In most cases, you will select all. However, sometimes you need to restrict access for certain users.

Configure user privileges in cPanel MySQL Wizard
Configure user privileges

6. You have completed the setup. From here you can choose to add additional databases, and users or return to your cPanel control panel.

Create a database manually

1. For manual setup, continue to step one in the cPanel Wizard guide above. Instead of clicking the wizard. Click “MySQL® Databases” in the “Databases” section.

cPanel MySQL Databases
cPanel MySQL databases area.

2. Enter a name for the database. Click “Create Database” then “Go Back”.

Manually create a database in cPanel
Create a new database

3. Navigate to “MySQL Users” then “Add New Users”

4. Create new user credentials including Username and password.

5. Click “Create User” then “Go Back”.

Manually create MySQL users in cPanel
Create a MySQL user

6. Navigate to “Add User To Database”.

7. Select the User & the Database you want them to have permissions for.

Manually add cPanel users to database
Add cPanel users to a database

8. Configure the user’s permissions.

Configure user privileges in cPanel MySQL Wizard
Configure user privileges

Create a MySQL Database in Plesk

1. Log in to your Plesk control panel.

2. Navigate to the right sidebar and click “Databases”.

Plesk admin area sidebar.
The Plesk admin sidebar

3. Click “Add a Database”.

Add a database in Plesk
Plesk database tool

4. Enter a database name. Select a related site (If applicable). Tick “Create a database user” then Enter user information for your database.

Add a database tool with configuration options.
Configure database in Plesk