Articles on: Technical

How to Create and Maintain MySQL Databases in cPanel?

How to Create and Maintain MySQL Databases in cPanel



MySQL is a popular relational database management system used by many websites and applications. cPanel provides easy-to-use tools for creating and maintaining MySQL databases. In this article, we will walk you through the process of creating a MySQL database and user, as well as assigning privileges in cPanel.

Step 1: Accessing the MySQL Databases menu



Log in to your cPanel account.
Find the Databases section and click on the MySQL Databases menu.

MySQL Databases Menu

Step 2: Creating a MySQL Database



In the MySQL Databases menu, find the "Create New Database" section.
Enter a name for your database in the provided field.
Click the "Create Database" button to create the database.

Create MySQL Database

Step 3: Creating a MySQL User



In the MySQL Databases menu, find the "MySQL Users" section.
Click on "Add New User" to create a new MySQL user.
Choose a username for your MySQL user.
Generate a secure password using the built-in Password Generator or set your own strong password.
Click the "Create User" button to create the MySQL user.

Create MySQL User

Note: Make a note of the password for future reference.

Step 4: Assigning the MySQL User to the Database



In the MySQL Databases menu, find the "Add User To Database" section.
Select the appropriate database and user from the dropdown menus.
Click the "Add" button to assign the MySQL user to the database.

Assign User to Database

Step 5: Setting Privileges for the MySQL User



After assigning the user to the database, you will be redirected to the "Manage User Privileges" page.
To grant all privileges to the MySQL user, select the "All Privileges" option.
Click the "Make Changes" button to save the privileges.

Set Privileges

Step 6: Confirmation and Verification



Once the privileges are set, you will receive a confirmation message stating that the MySQL user was successfully added to the database.

Creating and maintaining MySQL databases in cPanel is a straightforward process. By following the steps outlined in this article, you can easily create a MySQL database, assign a user to it, and set appropriate privileges. These tools provided by cPanel enable efficient management of your MySQL databases, empowering you to handle your website's data effectively.

Updated on: 23/11/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!