Back to knowledgebase

How to Use MySQL Databases in cPanel

MySQL Databases screen in cPanel

Create a MySQL Database

  1. Go to Databases > MySQL Databases.
  2. Enter the database name.
Create MySQL database form
  1. Click Create Database.
  2. Click Go Back.

Check a Database

  1. Find Modify Databases.
  2. Choose the database from Check Database.
  3. Click Check Database.

Repair a Database

  1. Find Modify Databases.
  2. Choose the database from Repair Database.
  3. Click Repair Database.

Create a MySQL User

  1. Scroll to MySQL Users.
  2. Enter the username.
  3. Enter and confirm a strong password.
Create MySQL user form
  1. Click Create User.
  2. Click Go Back.

Add a User to a Database

  1. Scroll to Add User To Database.
  2. Select the user.
  3. Select the database.
  4. Click Add.
MySQL user privileges screen
  1. Tick the privileges the user needs.
  2. Click Make Changes.

Remove a User from a Database

  1. Scroll to Current Databases.
  2. Find the database.
  3. Find the user under that database.
  4. Click the remove option next to the user.
  5. Confirm the change.

Delete a Database

  1. Scroll to Current Databases.
  2. Find the database.
  3. Click Delete.
  4. Confirm the deletion.

Notes

  • Most websites need a database, a database user, and privileges linking the two together.
  • Keep database passwords somewhere secure.
  • Do not delete a database unless you are certain it is no longer needed.