Creating and Managing MySQL Databases (Database Wizard)

Many web applications — including WordPress, online stores, and forums — store their content in a database. This article explains how to create a MySQL database, add a user, and connect the two using the MySQL Database Wizard in cPanel.

Note: This article assumes the MySQL Databases and Database Wizard tools are available on your hosting plan. Confirm shared-plan availability before relying on these steps.

What a MySQL database is

A database is where an application stores information — posts, products, user accounts, settings. Most modern web software needs one. To use a database, you create three things:

  1. The database itself (the container for the data).
  2. A database user (the account that reads and writes the data).
  3. A privilege assignment that connects the user to the database.

The MySQL Database Wizard walks you through all three in order, which is the easiest way to set up a new database correctly.

Tip: If you install an application through Softaculous, it usually creates and configures the database for you automatically — you only need this article when installing software manually or migrating a site. See Installing Applications with Softaculous.

Before you begin

  • cPanel access.
  • The application that will use the database, or its installation files, ready to configure.
  • A secure password for the database user. Use cPanel's password generator if available.

Step 1: Open the MySQL Database Wizard

  1. Sign in to cPanel.
  2. In the Databases section, select MySQL Database Wizard. [SME CONFIRM: section and tool names in the current cPanel theme.]

Step 2: Create the database

  1. Enter a name for your database in the New Database field.
  2. Select Next Step.

Note: cPanel adds a prefix to your database name based on your account (for example, youracct_). The full name — prefix plus what you typed — is what your application must use to connect.

Step 3: Create a database user

  1. Enter a Username for the database user. (This also receives the account prefix.)
  2. Enter and confirm a strong Password, or use Password Generator.
  3. Select Create User.

Warning: Save the full database name, the full username, and the password somewhere secure. Your application cannot connect to the database without all three, and the password is not shown again.

Step 4: Grant privileges

  1. On the privileges screen, select ALL PRIVILEGES so the user can fully manage the database.
  2. Select Next Step to finish.

The wizard confirms the database and user are created and linked.

Step 5: Connect your application

Enter the database details into your application's configuration:

Setting

Value to use

Database name

The full name, including the account prefix.

Database user

The full username, including the prefix.

Password

The password you set in Step 3.

Database host

Usually localhost.

For WordPress, these go in wp-config.php; other applications have their own configuration file or setup screen.

Managing existing databases

To work with databases you have already created, use the MySQL Databases tool in cPanel, where you can:

  • See all your databases and users.
  • Add or remove users and change their privileges.
  • Repair or check a database.
  • Delete a database you no longer need.

To view or edit the actual data inside a database, use phpMyAdmin — see the phpMyAdmin article. To change a database user's password, see the database password article.

Warning: Deleting a database permanently removes all the data it holds and will break any site that depends on it. Back up first using phpMyAdmin's Export feature.

Next steps

Questions? Contact Exact Hosting Support.

How helpful was this article?

Thanks for your feedback!

Do you still need help? If so please submit a request here.