This is a simple tutorial for Cpanel users to setup MySQL databases on their server. It is extremely easy to setup a MySQL database using Cpanel and as I will show you in the guide, it will take about 5 to 10 minutes. Don’t worry, it is very easy to do. If I can do it, so can you. All you need is your password and username to access your Cpanel account in your server. If you don’t have these information, get it from your webhost. You will need to enter to Cpanel’s console to add MySQL databases. The reason why I choose Cpanel is because it is one of the most popular web hosting control panel out there. In fact, most of the web host I have tried before used Cpanel exclusively, which is not too surprisingly considering that it is a very user-friendly control panel.

Anyway, let’s begin. In this tutorial, we will be using Cpanel v11. If you are using an older version, it should be around the same steps but the GUI will be slightly different. Again, don’t worry, it’s very very easy.

Okay, here we are at the main page of the Cpanel console after you have logged in. On the left (if you have the default theme), you will see your server specifications and stats. On your right, you will see the settings. Scroll down till you see Databases. Click on MySQL Databases.

At the top, you will see “Create New Database”. You will need to key in a new database name and then click on Create Database. In the tutorial, I have choosen the database name “new”.

There you go, a new database created. That was easy right? Click on Go Back to return to the MySQL main page.

Your new database name will usually be prefixed with your domain name as you can see from the above photo of the current databases. It has the prefix “sgsmallb” in front. However, your prefix will defintiely be different from what I have. So remember to take note of the full name of your database. For mine, the database name is now “sgsmallb_new”.

It is useless to create a database without a user connected to it. It’s like having a cake and nobody’s eating it. So what you need to do next is to create a new user for your database. You can of course make use of a prevous user and connect that user to your new database. Anyway, in this tutorial, we will be adding a new user. Key in the desired Username and password (twice) and then click on Create User (this is under MySQL Users).In the example, I have created a user with the username “me” and a password “cmv221d” (as you can see below).

There, all done! You have created a new user. Note that the username will usually be prefixed as well, just like the database name. Remember to take note of the full name and remember the password. Now click on Go Back.

Now, we are going to add a user to the database. You can see that in the above picture, there username has been added a prefix. In this example, the user “sgsmallb_me” will be added to the database “sgsmallb_new”. Click on Add after you are done.Note that you can add more users to a database in the future.

Next you will be presented with a option to provide certain privileges. For most cases, you will need to add “All Privileges” to your user’s rights. So tick on “All Privileges” and then click on “Make Changes”. If you need different privilges (rare), then by all means do the necessary changes.

Good. Your next move is to click on Go Back.

Now, under Current Databases, you can see the new database and the user connected to it. So, you are all done. You have just created an MySQL Database and added a user to it. And it took you like 5 minutes? Not difficult right? Don’t you just love good old Cpanel? Now go and enjoy your new database.