Databases are designed to store essential details and information across a set of tables controlled by a Database Management System (DBMS). MySQL is one of the most popularly used Database Management Systems. 

It is a free-to-use software that provides the stability, reliability, and security required for an effective database management system. This article provides a walkthrough process of creating or deleting a MySQL database or user.

How To Create A MySQL Database

To create a MySQL Database, use the following steps:

Login to your Control Panel

How to Create or Delete a MySQL Database or User

Go to the Databases section. You can type in the keyword ‘database’ for an accessible location.

Click on MySQL Databases

Give your new database a name.

How to Create or Delete a MySQL Database or User

Click on the Create Database button.,

How to Create or Delete a MySQL Database or User

If you created your database successfully, a success message would be displayed. It will also add your new database will also be added to the list of existing databases.

How To Delete A MySQL Database

To delete a MySQL Database:

Go to the Existing Databases section

How to Create or Delete a MySQL Database or User

Click the Delete button for the exact database you wish to delete

How to Create or Delete a MySQL Database or User

A confirmation box will pop up. Click on the YES button to confirm the delete action.

How to Create or Delete a MySQL Database or User

By doing this, you will successfully delete your database. 

Creating A MySQL Database User

We create a MySQL database to provide additional security and authentication for your website’s database. The user is assigned a login username and password, which differs from the Windows login credentials and the cPanel. 

Before any user, aside from the website owner, accesses a database, it would request the registered login credentials to validate its authenticity. 

How To Create A MySQL Database User

To create a new MySQL Database User, follow these steps:

  1. Login to your cPanel account

How to Create or Delete a MySQL Database or User

Go to the Databases section. You can type in the keyword ‘database’ for an accessible location. Click on MySQL Databases

2. Scroll to the New MySQL User section, Type in the UsernamePassword and Repeat the Password

How to Create or Delete a MySQL Database or User

3. Click on the Create User button.

How to Create or Delete a MySQL Database or User

You have successfully created a new MySQL database user. This user account differs from that of a web and mail administrator account.

How To Delete A MySQL Database User

When you wish to delete a database user:

Go to the Existing MySQL Users section and select the Username you wish to delete

How to Create or Delete a MySQL Database or User

Click the Delete button

How to Create or Delete a MySQL Database or User

Define User’s Privileges

Now that you have successfully created a new user account, it is vital to assign user privileges to determine the user’s control level over the database. As a website owner, you do not want to grant full database access to just anyone.

Assign Database User Privileges

To assign privileges to a database user, follow these steps:

Login to your cPanel account

How to Create or Delete a MySQL Database or User

Go to the Databases section. You can type in the keyword ‘database’ for an accessible location. Click on MySQL Databases

How to Create or Delete a MySQL Database or User

Scroll to the Grant Access To Database section

How to Create or Delete a MySQL Database or User

Select the user you would like to assign database privileges to and select the specific database assigned to the user.

How to Create or Delete a MySQL Database or User

Click on Add user to database

How to Create or Delete a MySQL Database or User

You have successfully assigned privileges to a database user.