How to Create a MySQL Database in cPanel

Note : This tutorial will teach you how to create a database and how to add an authorized user to it. Also, your database name along with your username will always include your cpanel account username and it should be taken into consideration when using the database (cpanelusername_mydatabasename is the right name to use to populate the configuration of a CMS)

1) Login to your cPanel account 

MySQL Database Menu of cPanel Interface

2) Click on the "MySQL Databases" icon within the cPanel interface.

Create MySQL Database input field

3) In the "Create New Database" field, type the name of the database you want and hit "Create Database".
Your database is now created.

Create MySQL Username and Password input field

4) Now, we will create a new user. In the MySQL Users and "Add New User" section. You may fill the Username / Password fields. You can use the password generator for a more secured password. Click on  "Create User".
Your user is now created.

Add MySQL Users rights to Database input field

5) We need to allow the user to interact with the database with granular authorisations. At the bottom of the MySQL Database page, you may  the "Add User to Database" section. You would need to select the database and the username you have just created and click "Add".

Privileges MySQL Management

Then, you can select the privileges of the user on the database. Generally, you would need to select "All Privileges and then click on the "Make Changes" button.

That's it, you have now created a database along with an authorized users. You can now use it in your web applications. 

Most of your web apps will ask you for a host / hostname for the MySQL which should be either "localhost" or "". 


  • mysql, create mysql database
  • 17 Users Found This Useful
Was this answer helpful?

Related Articles

How to Create An Addon Domain in cPanel

Description : Disclaimer : This how to assumes that you have changed your DNS settings at your...

Is the Shell Access Available on Shared Web Hosting Accounts?

Is the Shell Access (SSH) available on our Shared Web Hosting offers?Yes, we do offer a SSH...

How To Set Up A Cron Job with cPanel

All of our shared web hosting plans are coming with the possibility to set up cron...

How to Make a cPanel Full Account Backup

Description : Learn How to create your own Website BackupNote : With this tutorial you'll be able...

[VIDEO] How to change your cPanel Layout

 Description : Learn how to change your cPanel layout1) Login to your cPanel web hosting...