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


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


MySQL Databases Menu


Step 2: Creating a MySQL Database


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


Create MySQL Database


Step 3: Creating a MySQL User


  1. In the MySQL Databases menu, find the "MySQL Users" section.
  2. Click on "Add New User" to create a new MySQL user.
  3. Choose a username for your MySQL user.
  4. Generate a secure password using the built-in Password Generator or set your own strong password.
  5. 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


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


Assign User to Database


Step 5: Setting Privileges for the MySQL User


  1. After assigning the user to the database, you will be redirected to the "Manage User Privileges" page.
  2. To grant all privileges to the MySQL user, select the "All Privileges" option.
  3. 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!