How to Create or Delete a MySQL Database or User

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

How to Create or Delete a MySQL Database or User

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

How to Create or Delete a MySQL Database or User

2. Scroll to the New MySQL User section, Type in the Username, Password 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.

Conclusion

By following the step-by-step processes outlined in this article you have learned how to create and delete databases. 

You have also learned how to create MySQL database users and assign user privileges. 

If you encountered any hitches while setting up any of this processes, please leave a comment below and we would be happy to help out.

Was this helpful?

What’s your goal today?

1. Find the right Managed VPS solution

If you’re looking for industry-leading speed, ease of use and reliability Try ScalaHosting with an unconditional money-back guarantee.

2. Make your website lighting fast

We guarantee to make your WordPress site load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Fill out the form, and we’ll be in touch.

Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

3. Streamline your clients’ hosting experience

If you’re a web studio or development agency hosting more than 30 websites, schedule a call with Vlad, our co-founder and CTO, and see how we can deliver unmatched value to both your business and your clients.

Photo

Need a custom cluster or professional advice?

Book a meeting and get a free 30-minute consultation with Vlad, co-founder & CTO of Scala Hosting, who will help you select, design and build the right solution - from a single data center cluster to a multi-region & multi-datacenter high availability cluster with hundreds of servers.

Book a free consultation

4. Learn how to grow your website in 2023

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. Learn about the future of SEO, Web Design best practices and the secrets to getting the foundation for your website to thrive. Watch the exclusive webinar.

An Exclusive Insiders Look Behind The SEO and Web Development Curtain

Rado
Author

Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.