Creating a MySQL database in cPanel can be easily done from the cPanel in simple steps. In this tutorial we will cover 2 ways using which you can create your MySQL database from your cPanel. One is via MySQL database Section & the other is using MySQL Database Wizard. But first we will show you what are the basic things required for creating your MySQL database.
Creating a database from cPanel involves doing 3 steps:
1) Create a new MySQL database in cPanel.
2) Create a new database MySQL user that will be accessing the MySQL database.
3) Add MySQL user to your MySQL database and set the privileges for that user.
But all these steps for creating your MySQL database can be done easily and automatically using the cPanel MySQL Database section or MySQL Database Wizard.
There are 2 ways for creating the MySQL database from the cPanel:
1) Create database using MySQL Databases option in cPanel. (Recommended)
2) Create database using MySQL Database Wizard in cPanel. (Easy)
Create database using MySQL Databases option in cpanel
To create a MySQL database using the database create option in your cPanel, you need to follow the below instructions step by step:
1) Login to your cPanel.
2) Scroll down to the “Databases” section and click on “MySQL Databases” icon.
3) Locate the “Create a New Database” section and enter the database name that you want to create and press “Create Database” button.
Now the database has been successfully created.
4) Now in this step you need to create a new database user that will have access that newly created database.
To create a MySQL user, go to the MySQL Users section > Add a New User. This is just below the database section from where you had created the MySQL database. Enter the following details:
Username: Enter the name of MySQL database user that you want to create & assign to your earlier created database.
Password: Enter the password that you want to set for your MySQL User. You can also use the password generator to generate a strong password for you.
After entering all the details click on “Create a User” button.
5) Now the Next step is to add the newly created MySQL user to the MySQL database. To do this scroll down to the “Add a User to a Database” section.
Select the “User” that you want to assign and also select the “Database” to which you want to assign the user. Click on the “Add” button.
6) Now you need to set the privileges that you want to assign to the MySQL user to access the database. Generally you can grant all the privileges to the MySQL user. For that you need to check “ALL PRIVILEGES” and click on “Make Changes” button.
7) Now your MySQL user has been successfully assigned to your MySQL database and you will see a success message as shown below.
You can also verify if the user has been assigned properly by going to the “Current Databases” section in “MySQL Databases” area.
Create database using MySQL Database Wizard:
This method is much easier than the above described method for creating your MySQL database. In this method cPanel will automatically do the steps required for creating the database.
For creating MySQL database using MySQL Database Wizard you just need to follow the following steps:
1) Login to your cPanel. Scroll down to “Databases” section and click on “MySQL Database Wizard” icon.
2) Once there, under “Step 1: Create A Database”, enter the MySQL database name that you want to create in the text box next to “New Database” field. After that click on the “Next Step” button.
3) Now, in this next step you are going to create a “MySQL Database User” for the managing the created database in earlier step. Enter the “Username” & set the password for the user.
You can also use to password generator to set a strong password for you. Once done, click on “Next Step” button.
4) Now you need to set privileges to the MySQL User that you have just created. You can simply check “ALL PRIVILEGES” option and click on the “Next Step” button.
Now its all done. Your MySQL database has been successfully created. You will now see the following success message.
You can now use this database for your purposes.