New members get Extra 10% Discount! Code: KOLAN26 Copied!
00 Days
:
00 Hours
:
00 Min
:
00 Sec
Sign Up
Hosting & cPanel

How do I create a MySQL database?

Last updated: May 18, 2026 3 min read 18 views

You can create a MySQL database in cPanel in two ways: MySQL Database Wizard, which guides beginners step by step, or MySQL Databases, which handles each step separately for experienced users. In this guide we'll go through the Wizard; it completes database, user and permission assignment in a single flow.

1. Step by Step with MySQL Database Wizard

  1. Log in to cPanel.
  2. In the Databases section, click MySQL® Database Wizard.
  3. Step 1 — New Database: Enter the database name in New Database (e.g. wordpress). cPanel automatically prepends your username as a prefix; the full name becomes username_wordpress. Click Next Step.
  4. Step 2 — Database User: Enter the username in Username (e.g. wpadmin; full form username_wpadmin). Enter a strong password in Password or generate one with Password Generator. Click Create User.
  5. Step 3 — Permission Assignment: Check the ALL PRIVILEGES box in the list that appears. This allows the user to perform all read/write operations on the database. Click Next Step.
  6. Step 4 — Done: The confirmation screen shows database and user information. Store this information in a secure place.
Important: The database/username plus prefix together must not exceed 64 characters; cPanel automatically truncates longer names. Also, the password you set is not shown again later; if you don't note it down you can only reset it.

2. Connection Information to Use in Your Application

WordPress, Joomla or your own PHP application will use the following values to connect to this database:

  • Host: localhost
  • Database name: username_wordpress
  • Username: username_wpadmin
  • Password: The password you set during creation
  • Port: 3306 (default; most applications don't require you to specify)
Note: As long as your application runs on the same hosting account, localhost is used as the host. The server's IP or domain name is not needed.

3. Management with phpMyAdmin

After creating the database, use phpMyAdmin to add tables, run SQL or take backups:

  1. On the cPanel main screen, in the Databases section, click phpMyAdmin.
  2. Select the relevant database from the left menu.
  3. From the top tabs you can perform Structure (tables), SQL (run queries), Import (upload SQL files) and Export (take backups) operations.

4. External Connection (Remote MySQL)

If you want to connect to the database from your office computer or a different server, you need to whitelist the relevant IP:

  1. On the cPanel main screen, in the Databases section, click Remote MySQL®.
  2. Enter the IP address to connect from in the Host field (e.g. 85.105.10.42).
  3. Click Add Host.

Requests from IPs not added here are rejected by the firewall. If your IP changes dynamically, you need to update it each time it changes.

5. Deleting a Database or User

  1. In cPanel, in the Databases section, go to MySQL® Databases.
  2. In the Current Databases table, click Delete next to the relevant database.
  3. On the same page, in Current Users, you can also remove the user.
Caution: When you delete a database, all tables and data inside are permanently lost; there's no way back. We recommend taking a backup with phpMyAdmin's Export feature before deleting.

If you have issues with the database setup or your application's connection, you can open a support ticket and share the error message; our team will investigate and help.

Step 1 / 2