01 / cPanel guidesUpdated 7 Nov 2026

How to create a MySQL database and user in cPanel

Most web applications, WordPress included, need a database, a database user and that user’s password. In cPanel you create all three at once with the Database Wizard, or one by one in Manage My Databases. This guide covers both, plus privileges, phpMyAdmin and remote access.

Short answer

To create a MySQL database in cPanel, open Databases » Database Wizard, enter a database name and click Next Step. Create a user with a strong password, tick ALL PRIVILEGES and click Next Step again. cPanel usually adds your username as a prefix, so the names look like jane_shop. Give your application those full names, the password and the host localhost.

Where
cPanel » Databases
Screens
Database Wizard · Manage My Databases
Applies to
cPanel & WHM 134 (LTS) to 138, Jupiter theme
Older names
MySQL Database Wizard · MySQL Databases (before 120)

How cPanel names databases

On most servers cPanel puts your cPanel username and an underscore in front of every database and database user, for example jane_shop. The form shows this prefix in front of the box and adds it for you. Your application must use the full name, prefix included.

A database name can be up to 64 characters, or 63 with the prefix counted in. Each underscore counts as two characters.

The quick way: Database Wizard

  1. In the Databases section, click Database Wizard.
  2. Enter a name in New Database and click Next Step.
  3. Enter a Username and a password, or use Password Generator, then click Create User.
  4. Tick ALL PRIVILEGES, or only the privileges the application needs, and click Next Step.

The wizard links the user to the database for you. Write down the database name, the username and the password: cPanel does not show the password again.

Step by step: Manage My Databases

  1. Open cPanel » Databases » Manage My Databases.
  2. In New Database, enter a name and click Create Database, then Go Back.
  3. Further down the page, enter a Username and a password and click Create User, then Go Back.
  4. Under Add User To Database, pick the user and the database and click Add.
  5. On the MySQL Account Maintenance screen, tick ALL PRIVILEGES or single privileges and click Make Changes.

The same page lists your databases and users. From there you can rename or delete them, change a user’s password, and remove a user’s privileges on a database.

Which privileges to give

ALL PRIVILEGES suits a typical application that creates its own tables, such as WordPress during installation. A user that only reads data, for example a reporting tool, needs no more than SELECT.

cPanel grants privileges on one database at a time. Server-wide privileges are not part of the list.

Open the database in phpMyAdmin

Click phpMyAdmin in the Databases section. It opens with your cPanel account and shows that account’s databases.

To load an existing .sql export, select the database on the left, open the Import tab, choose the file and click Import (labelled Go in older phpMyAdmin versions). The file must fit under the PHP upload limit.

NoteCreate databases and users in cPanel, not in phpMyAdmin. cPanel does not track databases made there, and backups and restores can break.

Allow a connection from another computer

To reach a database from your own computer or another server, open cPanel » Databases » Remote Database Access (called Remote MySQL in older versions). Enter the IP address or host name in Host, optionally a Comment, and click Add Host.

NoteThe % wildcard is accepted, but it opens the database to every address on the internet. Add only the addresses that need it.

Common problems

WordPress shows “Error establishing a database connection”.
The name, user or password in wp-config.php does not match, often because the cPanel prefix is missing. Copy the full names from Manage My Databases.
Access denied for the database user.
The user has no privileges on that database. Add it under Add User To Database, or check the password.
The name is refused as too long.
The prefix counts towards the limit, and each underscore counts twice. Choose a shorter name.
cPanel will not create another database.
The package limit (Max SQL Databases) is reached. Delete an unused database or ask your host for more.

Doing it from CTAServer

The Databases screen in CTAServer lists every database and database user on the cPanel servers you connect, with the hosting account that owns each one. CTAServer calls cPanel’s own Mysql functions through the WHM API and adds the account prefix the way cPanel does.

  • You can create a database or a user, change a user’s password, and delete either. Deleting a database needs a one-time confirmation code.
  • Database user passwords must be 12 to 128 characters, without quotes, backslashes or backticks.
  • Linking a user to a database and choosing privileges stays in cPanel: cPanel’s privilege API gave inconsistent results in our tests, so CTAServer does not offer it on cPanel servers.
  • phpMyAdmin opens with one click for the account that owns the database, when the WHM token is allowed to open sessions.

Frequently asked questions

What is the MySQL host name in cPanel?

For a website on the same cPanel account, use localhost. From another computer, use the server’s IP address or host name, and first add your own IP address in Databases » Remote Database Access.

Why does cPanel add a prefix to my database name?

Many accounts share one database server, so cPanel puts the account username and an underscore in front of each database and user name to keep them apart, for example jane_shop. The form shows the prefix. Always use the full name in your application.

How do I import a .sql file into a cPanel database?

Create the empty database and its user in cPanel first. Then open phpMyAdmin, select the database, open the Import tab, choose the .sql file and start the import. Large files can hit the PHP upload limit.

How do I change a MySQL user’s password in cPanel?

Open Databases » Manage My Databases, find the user under Current Users, click Change Password, enter the new password and save. Update the password in your application’s configuration as well, for example in wp-config.php.

Does cPanel use MySQL or MariaDB?

Either, depending on what the server administrator installed. The cPanel screens and the steps are the same for both, and applications connect to them in the same way.

How do I delete a database in cPanel?

Open Databases » Manage My Databases, find the database under Current Databases and click Delete, then confirm. Deleting removes all its tables and cannot be undone, so download a backup first.

02 / Get started7 days free · No card needed

Connect your first server today.

Free for 7 days, no card needed. Create your account, add your first server with an API token or an SSH key, and the panel starts filling in a few minutes later.

No setup fee · Cancel anytime · EU-hosted