How to create and maintain MySQL Databases in cPanel

How to create and maintain MySQL Databases in cPanel


This tutorial describes the process of creating and managing MySQL Databases in cPanel.

There are two cPanel tools that allow creating MySQL Databases: MySQL Databases menu and MySQL Database Wizard. Let’s find out how each of them actually works. 

Creating database from MySQL Databases menu

1. In order to start, log into cPanel and click on MySQL Databases menu in Databases section: 

2. Once there, find  Create New Database section, then simply indicate name of the future database and click onCreate Database button:

3. The database is created and ready to use. Now, in order to be able to fill and maintain the database, MySQL User should be created and assigned to the database with correct privileges. To create MySQL User, find the section called MySQL Users > Add New User and choose username you wish to assign to your database. Once done, choose secure password for MySQL User and type it into corresponding fields:

It is highly recommended to use built-in Password Generator to create secure password as shown below: 

Make sure to save the password, as you will need it to maintain the Database in the Future. 

4. After the password is chosen, simply click on Create User button, to finish the process: 

5. Now you have both MySQL Database and MySQL User created. Now we need to assign MySQL User to the database and set proper privileges. To do this, find Add User To Database section and make sure to choose correct Database and User correspondingly. Once done, simply click on Add button:

6. On the next window you will need to set correct privileges to the MySQL User. In this example, we shall grant all privileges to be able to maintain our MySQL Database without any restrictions, so you simply need to chooseAll Privileges option and click on Make Changes button: 

NOTE: it is important to remember that multiple MySQL Users with different sets of privileges can be assigned to the same MySQL Database.

7. Once finished, you will get the message stating that MySQL User was successfully added to the Database:

To check this, you can simply go back to MySQL Databases menu and check Current Databases section:

Creating database with MySQL Database Wizard tool

MySQL Database Wizard brings the same step-by-step process which is described above, but in more simplified way. Let’s check how it works: 

1. To find the tool, log in to cPanel and click on MySQL Database Wizard option under Databases

2. Once done, indicate the name of the new database and click on Next Step button: 

3. On Step 2 you will be prompted to indicate MySQL User and choose password for it, reciprocally to the process described before: 

4. After username and password are indicated, simply click on Create User button:

5. The next windows will allow to set privileges for newly created MySQL User similarly to the process described previously. 

Accordingly you will need to choose All Privileges option and click on Next Step button after that: 

6. Once done, you will get confirmation that MySQL User was successfully added to MySQL Database: 

  • 3 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Related Articles

How to check PHP version and configuration

How to check PHP version and configuration Phpinfo() function is commonly used to check the...

How to set up FileZilla

How to set up FileZilla Once you’ve downloaded and installed FileZilla, launch the program....

Uploading Your Website Files

Uploading Your Website Files   There are three possible ways to use FTP: cPanel File Manager...

File permissions

File permissions   Each file and folder located in your account has certain permissions...

How to manage databases with phpMyAdmin

How to manage databases with phpMyAdmin   phpMyAdmin is an application for MySQL databases...