Databases are designed to store essential information across a set of tables controlled by a database management system (DBMS). MySQL Database is one of the world’s most popular database management systems.
It is free-to-use software that provides the stability, reliability, and security required for an effective database management system. This article provides a walkthrough process for creating or deleting a MySQL database or user.
How To Create A MySQL Database
If you want to create a MySQL Database, follow the steps below:
- Login to your HostPanel. Go to the Databases section in HostPanel. To find this option quickly, you can search by typing “database” in HostPanel’s search bar. Click on MySQL Databases.
- Give your new database a name.
- Click on the Create Database button.
If you successfully created your database, a success message will be displayed. And this new database will 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. Click the Delete button for the exact MySQL database you want to delete.
- A confirmation box will pop up. Click on the YES button to confirm the action.
- By doing this, you will successfully delete your database.
Creating or Deleting A MySQL Database User
We offer to create a MySQL database user to provide additional security for your website’s database. The user is assigned a username and password, which is separate from the HostPanel credentials.
Before any user except the website owner can access the database, it will request to verify the authenticity of the registered login credentials.
How To Create A MySQL Database User
To create a new MySQL Database User, follow the steps below:
- Login to your HostPanel account. Go to the Databases section in HostPanel. To find this option quickly, you can search by typing “database” in HostPanel’s search bar. Click on MySQL database.
- Scroll to the New MySQL User section, type the username, and password, and repeat the password.
- Click on the Create User button.
Now you have successfully created a new MySQL database user. This user account differs from that of a hosting control panel, website administrator, and mail administrator account.
How To Delete A MySQL Database User
If you want to delete a database user:
- Go to the Existing MySQL Users list and select the Username you want to delete. Click the Delete button.
Define User’s Privileges
Now that you have successfully created a new user account, it is important to assign user privileges to determine the user’s level of control over the database. As a website owner, you don’t need to give anyone full database access.
Assign Database User Privileges
To assign privileges to a new MySQL database user, follow the steps below:
- Login to your HostPanel account. Go to the Database section in HostPanel. To find this option quickly, you can search by typing “database” in HostPanel’s search bar. Click on MySQL database.
- Scroll down and click on the Grant Access To Database section.
- Select the user you want to assign database privileges and select the specific database assigned to the user.
- Click on Add user to the database.
You have successfully assigned privileges to a MySQL database user.
Conclusion
You learned how to create and delete databases by following the step-by-step processes described in this article.
You also learned how to create MySQL database users and grant user privileges.
If you encounter any obstacles while setting up any of these processes, please contact our technical support team