> ## Documentation Index
> Fetch the complete documentation index at: https://speedypage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a MySQL database

> How to create a MySQL database, database user, and assign privileges using the Database Wizard in cPanel.

Most web applications (WordPress, WooCommerce, Joomla, etc.) need a MySQL database to store their data. You can create one in cPanel using the Database Wizard, which walks you through the process step by step.

## Create a database with the Database Wizard

<Steps>
  <Step title="Open the Database Wizard">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Databases** and click **Database Wizard**.
  </Step>

  <Step title="Name the database">
    Enter a name for your database and click **Next Step**. cPanel adds your account prefix automatically, so if your cPanel username is `example` and you enter `wp`, the database name will be `example_wp`.
  </Step>

  <Step title="Create a database user">
    Enter a username and set a strong password (or use the **Password Generator**). Click **Create User**. The username also gets your account prefix, so entering `admin` creates the user `example_admin`.
  </Step>

  <Step title="Assign privileges">
    Select the privileges the user should have on the database. For most web applications, select **ALL PRIVILEGES**. Click **Next Step**.
  </Step>
</Steps>

Your database is now ready to use.

## Naming restrictions

Database and user names are prefixed with your cPanel username and an underscore (e.g. `username_dbname`). Keep these limits in mind:

* Database names can be up to 64 characters total (including the prefix). Each underscore counts as two characters toward this limit.
* Usernames are limited to 32 characters for MySQL (including the prefix).
* Database names cannot contain `/`, `"`, `'`, or backtick characters.
* Usernames can only contain alphanumeric characters.

## What to do next

Once the database exists, you'll usually need to import data into it or connect it to your application:

* **Importing data** — see [Import and export MySQL databases](/web-hosting/database-import-export) for how to import a `.sql` file through phpMyAdmin or SSH.
* **Connecting an application** — enter the database name, username, password, and `localhost` as the host in your application's configuration file (e.g. `wp-config.php` for WordPress).

<Tip>
  You can also create databases and users through the **Manage My Databases** interface in cPanel if you prefer a non-wizard view. Go to **Databases** > **MySQL Databases**.
</Tip>
