How to create and maintain MySQL database in cPanel and connect to phpMyAdmin. Because it is difficult for beginners to detect these things and without the MySQL database, the data of the website will not be store properly. And if there is an error(‘Access denied create database db_name’ error) in uploading your old database.
Creating and maintain a database from the MySQL Databases menu
You can easily access your MySQL database menu from your hosting cPanel.
1. . To configure your MySQL Databases menu, log into your cPanel, and click on the MySQL Database Section

2. . After getting there, create a new database, just enter the name of the database you want and click the Create Database
3. Your database has been created and ready to use. Now, in order to fill and manage the database, MySQL user should create a correct privilege to the database
To create a MySQL user, Find the field called MySQL Users. Here you need to add a user name, Once done, choose a secure password for MySQL User. And click on Create user.
We highly recommend using the built-in Password Generator to create a highly secure password.

Please note down the password to use in the future to maintain the database
4. After the password is chosen, simply click on the Create User button to create a user

5. Now you have created both MySQL Database and MySQL User. Now you need to allow Which User you want to assign MySQL database. To do this, find the Add User To Database section and make sure that you choose the correct Database and User correspondingly. Once done, simply click on the Add button
6. Next, you need to set the correct privileges for the MySQL user. Here you will be given all privileges to be able to maintain your MySQL database without any restrictions, hence you need to select all privileges option. Click on the Make changes button


7. When finished, you will see the message that MySQL was successfully added to the user database.

8. To check, simply go back to the MySQL Database menu And check the Current Databases section.

As you create and maintain MySQL Database, but to configure the database you need to connect it with phpMyAdmin because without this you cannot access the database. To connect them you need to modify your Wpconfig.php file which is basically located in your public_html folder.

1. Open the public.html folder in file manager then find the wp-config.php file and open to edit

2. . After opening the file, Inline 34 enter your database name (DB), 38 enter your username, 42 enter your password, That you entered when you created the MySQL database, and save the file for your MySQL database. here’s what it looks like.

Now your database is fully configured, now you can do any work by going inside it through phpMyAdmin.
Subscribe to our Newsletter: