How to create a Database in cPanel
1 month ago by Tamas
cPanel is an easy-to-use webhosting account management tool that, among others, makes it possible to easily and quickly create MySQL databases. This tutorial will show you how to create a MySQL database, how to set up a database user and how to connect this user to the database itself.
First thing you need to do is to log into your cPanel account. Once you are logged in, find the “Databases” section and select “MySQL Databases“.
Enter a name for the new database. You may or may not have a prefix here. If you are on a shared hosting account, the prefix will be your cPanel username.
Click the “Create Database” button and cPanel will create the database for you. That’s it, you’ve just created a MySQL database.
How to create a database user
In order to access your database, you’ll need a database user. Let’s create one!
If you left the previous page (database page), you should go back, because at this same place we can create a database user as well. If you have lots of databases created, you may have to scroll down a bit. Scroll down until you see the following section:
Type a name and create a strong password. Click on the “Create a User” button. You will receive a message that the user has been created.
It’s a good idea to create new users and new databases for your sites.
Give access to the database
Now you have to give the user access to the new database. Go back to the “MySQL Databases” page and scroll down to the “Add a user to a database” section.
Select the user and the datanase that you just created and click the “Add” button. On the next page click the “All privileges” checkbox and then the “Make changes” button.