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 "127.0.0.1". 

 


Contact Us

Your message has been sent!

Thank you! We’ll take a look at your request and get in touch with you as quickly as possible.

Let us know what you’re looking for by filling out the form below, and we’ll get back to you promptly during business hours!





    Start typing and press Enter to search