โ† Knowledge Base
cPanel4 min read

How to Create a MySQL Database in cPanel

Every web application โ€” WordPress, WooCommerce, Joomla, Drupal, or a custom PHP app โ€” stores its data in a MySQL database. Before you can install any of these, you need to create a database and a user with the correct privileges. Here is how to do it in cPanel on your Hostinap Shared or Business Hosting account.

Step 1: Log in to cPanel and Open MySQL Databases

Navigate to https://yourdomain.com/cpanel and log in. Scroll down to the Databases section and click MySQL Databases.

Step 2: Create the Database

Under the Create New Database section, type a name for your database in the text field. Choose something descriptive, e.g. wordpress or shopdb. Note: cPanel automatically prefixes the name with your cPanel username, so the full database name will look like cpanelusername_wordpress. Click Create Database.

Step 3: Create a MySQL User

Scroll down to the MySQL Users section. Enter a username (e.g. wpuser) and a strong password. Click the Generate Password button to create a secure random password โ€” copy it somewhere safe before proceeding. Click Create User.

Step 4: Assign the User to the Database

Scroll down to the Add User To Database section. Select your newly created user from the User dropdown and your new database from the Database dropdown. Click Add.

On the next screen, check the box next to ALL PRIVILEGES and then click Make Changes. This gives your user full control over the database, which is required by most applications.

Your Database Credentials at a Glance

When configuring your application (e.g. filling in wp-config.php for WordPress), you will need:

How to Browse Your Database Using phpMyAdmin

To view, edit, or import/export your database tables, go to cPanel > phpMyAdmin. Click your database name in the left panel to browse all its tables. You can run SQL queries, repair tables, and import .sql backup files from here.

Running a Resource-Heavy Database?

If your WooCommerce or membership site generates thousands of database queries per minute, Business Hosting provides dedicated high I/O limits and up to 8 GB RAM for database performance that shared hosting cannot match.

View hosting plans
100% FREE MANAGED SERVICE

Confused by these steps? We'll do it all for you โ€” completely free!

Don't want to spend hours configuring DNS records, PHP modules, FTP permissions, database restores, or SSL certs? Every Hostinap hosting plan comes with free expert management. Pick any plan and our certified engineers will handle all setup and migrations for you today.

Free Site Migration: Zero downtime, same-day transfer.
15-Minute Human Reply: WhatsApp, phone & ticket support.
30-Day Guarantee: 100% refund if you're not satisfied.
Registered LLPHostinap Software Solutions
cPanel PartnerLicensed control panel
LiteSpeedLicensed web server
Since 201510+ years hosting