How Do I Create a MySQL Database, a User, and Then Delete if Needed in cPanel?

Create a MySQL Database, a User, and Then Delete if Needed in cPane:

Databases offer a method for managing large amounts of information over the web easily. They are necessary to run many web-based applications such as bulletin boards, content management systems, and online retail shops.

Create or Delete a MySQL Database:

Create a MySQL Database:

  1. Log into cPanel.
  2. Under Databases, click MySQL Databases.
  3. In the New Database field, type a name for the database.
  4. Click Create Database.
  5. Click Go Back.

The new database will appear in the Current Databases table.

Delete a MySQL Database:

  1. Navigate to the Current Databases section of MySQL Databases.
  2. In the Actions column of the table, click Delete Database next to the database you wish to delete.

If you would like to remove a user that has been assigned to a database, click the X next to the user on this table. Please see the instructions below See Below on how to assign a database user.
Create or Delete a Database User

After creating the database, you will need to create a user and assign privileges. Please note that MySQL user accounts must be created separately from mail and web administrator accounts.

Create a Database User:

  1. Log into cPanel.
  2. Under Databases, click MySQL Databases.
  3. Click Jump to MySQL Users in the top-right corner of the page.
  4. Under Add New User, enter a username. Be sure that the username is 7 letters or shorter.
  5. Enter a password in the Password field.
  6. For help generating a strong password, click the Generate Password button.
  7. Retype the password in the Password (Again) field.
  8. Click Create User.

Delete a Database User:

  1. Navigate to the Current Users section of MySQL Databases.
  2. In the Delete column, click the X next to the user you wish to delete.

Define a User's Privileges:

Privileges determine how a user is able to interact with the database. For example, privileges will dictate whether or not the user can add and delete information.

Assign Privileges to Database User:

  1. Log into cPanel.
  2. Under Databases, click MySQL Databases.
  3. Under Add User to Database, select a user from the User drop-down menu.
  4. From the Database drop-down menu, select the database to which you wish to allow the user access.
  5. Click Add.
  6. From the MySQL Account Maintenance screen, select the privileges you wish to grant the user, or select ALL PRIVILEGES.
  7. Click Make Changes.

Un-assign a User from a Database:

  1. Navigate to the Current Databases section of MySQL Databases.
  2. Locate the database you wish to modify.
  3. In the Users column for that database, click the X next to the user you wish to delete. (You can see an example of this table by clicking here.)

Using the Database

Now that you can create databases and users and assign appropriate privileges




Was this answer helpful?

 Print this Article

Also Read

How to Upload to an Addon or Subdomain in cPanel?

Upload to an Addon or Subdomain in cPanel: Option 1 In a FTP client enter this information....

I Accidentally Deleted the public_html or www Folder

I Accidentally Deleted the public_html or www Folder: If you delete the www folder, your site...

How to Connect to the MySQL Database in cPanel?

Connect to the MySQL Database in cPanel:In order for your MySQL database to work as intended, it...

Tips and Tricks for Moving Databases

When you move databases to our servers, the database name and username may change. This change...

What is a Parked Domain? How Do I Create and Delete One in cPanel?

Create and Delete Park Domain in cPanel: Parked domains are often used by businesses that want...