Creating MySQL Databases and Users

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

In this article, we will go over the steps that you need to take to create a new database and a new user that will be assigned to the database successfully. When you’re setting up an application or script from scratch, this is something that is typically required. We would suggest using the Softaculous Auto-Installers when possible, which set up applications like Magento, Joomla, and WordPress for you.

You need to log into your account on cPanel to start the whole process. Then, after you’re logged in, go to the tab Databases and search for the MySQL Database Wizard.


Once you have managed to access this tool, there are some steps you will need to go through, and the first one is the creation of the name of the database. Your cPanel username will prefix the database name, for instance, cpaneluser_db. In order to avoid any confusion that might arise in the future, it is best that you use something descriptive. So, instead of just using “DB,” use something like “wordpress” or “wp.”

You will be asked what should your database password and username be on the net page. The database user is the easiest to create with the same username as the name of the database. When it comes to the password, you can use the “Password Generator,” which is built-in, or you can just type in a password of your choice. Once you’re satisfied with your username and password, click on the button “Create User,” which will lead you to the next page.


For the database you just created, you will need to assign the user, and most of the time, for the user, you will need all of the privileges. For this, you will need to tick the box next to the phrase “All Privileges.” Click on the button “Next Step” once you’ve done this. This is the last step, which means that you’ve managed to create your database and user for your cPanel account successfully.


If you want to delete a MySQL database, you need to go to MySQL Databases and go to the section “Current Databases.” In the column “Actions,” click on the delete that is located next to the database you want to delete. In order to remove the database permanently, just confirm your action, and you’re good to go.

If you want to delete a database user, you need to go to MySQL Databases and navigate to the section “Current Users.” Once you’re there, look for the database user that you want to delete, and then click on the delete icon that is net to the database user. In order to confirm the deletion, click the Delete User icon.