How do I create a MySQL database?


MySQL is a relational database management system or RDBMS. Within cPanel MySQL supports backend operation by allowing authorised access and manipulation of a database through SQL queries.

Firstly, without a database, content management system-type applications could not function. These applications include WordPress, Drupal, Joomla, and Magento. Also enables the LAMP style servers (Linux, Apache, MySQL, and PHP). 

When trying to create a MySQL database in cPanel we recommend using the pre-packaged MySQL wizard
It also gives a user-friendly database creation guide that ensures new databases are correctly configured with a user-specific database prefix and an assigned user with configurable permissions.

You can also opt to set up your MySQL database manually. This interface also lets you check and repair a database within cPanel. 

cPanel also supports the viewing and manipulation of individual databases and their tables through phpMyAdmin.

For WordPress, it is important that databases are correctly configured including the database prefix, table prefix, and database user credentials.
Otherwise, any incorrect configuration will cause the “Error establishing a database connection” or other error messages to appear.

MySQL Wizard

  • 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
  • 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
  • Enter a username and password for your database user.
    Similarly, you can see that username prefix is already set and cannot be changed.
Creating a database user with the cPanel  the MySQL Wizard
Create a database user
  • To secure the account we recommend using the password generator. This is because the generator creates a unique password.
cPanel Password Generator
  • 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
  • You have completed the setup. From here you can choose to add additional databases, users or return to your cPanel control panel.

Create a MySQL Database Manually in cPanel

  • For manual setup, continue for 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.
  • Enter a name for the database. Click “Create Database” > “Go Back”.
Manually create a database in cPanel
Create a new database
  • Navigate to “MySQL Users” > “Add New Users”
  • Create new users credentials including: Username, Password. 
  • Click “Create User” > “Go Back”. 
Manually create MySQL users in cPanel
Create a MySQL user
  • Navigate to “Add User To Database”
  • Select the User & the Database you want them to have permissions for.
Manually add cPanel users to database
Add cPanel users to a database
  • Configure the users permissions.   
Configure user privileges in cPanel MySQL Wizard
Configure user privileges

Create a MySQL Database in Plesk

  • Log in to you Plesk control panel.
  • Navigate to the right sidebar and click “Databases”
Plesk admin area sidebar.
The Plesk admin sidebar
  • Click “Add a Database”.
Add a database in Plesk
Plesk database tool
  • Enter a database name.
  • Select a related site (If applicable).
  • Tick “Create a database user”.
  • Enter database user information.
Add a database tool with configuration options.
Configure database in Plesk