To create a MySQL database and user in cPanel, open the MySQL Databases tool, create a new database, create a database user with a strong password, then add that user to the database and grant it all privileges. This article walks through each step on the standard cPanel (Jupiter) interface and shows how to connect your application afterward.

Before you start

Most applications, including WordPress, Joomla, and custom PHP projects, store their content in a MySQL (or MariaDB) database. cPanel manages three separate pieces: the database itself, a database user, and the privileges that link the two. You need all three before an application can read and write data. Have your intended application handy, because you will paste these values into its configuration during installation.

Step 1: Open the MySQL Databases tool

  1. Log in to cPanel.
  2. In the Databases section, click MySQL Databases.

On our LiteSpeed and CloudLinux servers the interface is identical to standard cPanel, so the steps below apply to every ASEOHosting shared and reseller plan.

Step 2: Create the database

  1. Under Create New Database, type a short, descriptive name such as appdata.
  2. Click Create Database.

cPanel automatically prefixes the name with your account username. If your username is seohost, the full database name becomes seohost_appdata. Always use the full prefixed name in your application configuration.

Step 3: Create a database user

  1. Scroll to MySQL Users and find Add New User.
  2. Enter a username, for example appuser. It also receives the account prefix, becoming seohost_appuser.
  3. Click Password Generator to create a strong password, or type your own. Use at least 12 characters mixing upper and lower case, numbers, and symbols.
  4. Copy the password to a safe place, then click Create User.

Step 4: Add the user to the database

  1. Scroll to Add User To Database.
  2. Select your user (seohost_appuser) and your database (seohost_appdata) from the dropdowns.
  3. Click Add.
  4. On the Manage User Privileges screen, check ALL PRIVILEGES, then click Make Changes.

Granting all privileges is normal for a single application that owns its database. If you host several apps, give each one its own database and user so a compromise in one cannot reach the others.

User seohost_appuser ALL PRIVILEGES granted on Database seohost_appdata

Step 5: Connect your application

Your application needs four values to connect. For software running on the same account, the host is almost always localhost:

Database host: localhost
Database name: seohost_appdata
Database user: seohost_appuser
Database pass: your-strong-password

In a WordPress wp-config.php file, these map to DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST. If you are setting up WordPress specifically, our WordPress SEO hosting plans ship with the tuning and isolation these installs benefit from.

Managing databases later

Return to MySQL Databases at any time to rename a database, remove a user, or repair a table. For direct SQL access and imports, use phpMyAdmin, also found in the Databases section. To change a user password, delete and recreate the user, or edit it through phpMyAdmin.

For deeper reference on the tool, see the official cPanel documentation. If you run into a permissions or connection error you cannot resolve, our team can check it from the server side; reach us through contact us or browse more cPanel and technical guides.

Was this answer helpful? 0 Users Found This Useful (0 Votes)