Knowledgebase

How to Create a MySQL Database By Using cPanel?

Creating and managing databases is a crucial task for web developers and administrators. It’s the backbone of storing and organizing data, which is then accessed and manipulated by web applications. 

MySQL is one of the most popular relational database management systems (RDBMS) used in web development due to its reliability, ease of use, and robust feature set.

For many users, especially those who manage their own websites, cPanel is a fantastic web hosting control panel. It simplifies server and website management through a user-friendly graphical interface, allowing you to perform various tasks without complex command-line operations. 

This detailed guide aims to provide a comprehensive understanding of creating a MySQL database using cPanel. Whether you are a beginner setting up your first database or an experienced user looking for a refresher, this guide will walk you through each step of the process. 


Also Read: How to Configure Domain Redirects in cPanel?


Step-by-Step Guide to Creating a MySQL Database Using cPanel

Step 1: Log in using your cPanel username and password.

Log in using your cPanel

Step 2: Once logged in, look for the ‘Databases’ section. 

look for the Databases section

Step 3: In that, click the ‘Manage Databases’ icon to open the MySQL Databases page.

click the ‘Manage Databases’ icon

Step 4: On that page, look for the ‘Create New Database’ section. You will see a field where you can enter the name of your new database.

look for the ‘Create New Database’ section

Step 5: After entering the name you want to keep for your database, click the ‘Create Database’ button.

click the ‘Create User’ button

Step 6: It’s time to create a MySQL user. Scroll down to the ‘Database Users’ section on the same page & enter a username and password for the new database user. You need to ensure the password is strong (you can use the Password Generator tool for this).

Scroll down to the ‘Database Users’ section

Step 7: Once you’ve entered the details, click the ‘Create User’ button.

click the ‘Create User’ button

Step 8: Now, you have to add a user to the database. Find the section labeled ‘Add User to Database.’ In that, use the dropdown menus to select the user and the database you just created.

section labeled ‘Add User to Database

Step 9: After selecting the appropriate user and database, click the ‘Add’ button.

click the ‘Add’ button

Step 10: On the next screen, you will be asked to set the user’s privileges. Check the ‘All Privileges’ box to grant the user full access to the database, 

Check the ‘All Privileges’ box to grant the user

Step 11: Once done, click the ‘Make Changes’ button.

click the ‘Make Changes’ button

Step 12: Navigate back to the MySQL Databases page to verify that your database and user have been successfully created.

  • You should see your new database listed under ‘Current Databases.’
  • Under ‘Current Users’, ensure that the new user is listed and assigned to the database with the correct privileges.
database with the correct privileges

Also Read: How to Change MySQL Database User Password From cPanel?


That’s it! Following this guide, you can easily set up your database and user, ensuring your web applications have the necessary backend support. With the help of regular maintenance and following best practices will help keep your database secure and efficient.