title: Database Wizard
created at: Sat Oct 19 2024 14:31:00 GMT+0000 (Coordinated Universal Time)
updated at: Mon Jul 21 2025 21:28:01 GMT+0000 (Coordinated Universal Time)
---
# Database Wizard
# Overview
This wizard guides you through the setup of a MySQL or MariaDB database, user accounts, and user privileges. We recommend that you use this wizard to create your first database and user.
> \[!NOTE]
> Note
> In cPanel & WHM version 118 and earlier, we titled this interface [*MySQL\_\_ Database Wizard*](https://docs.cpanel.net/cpanel/databases/mysql-database-wizard) .
> To create additional databases or users, you can also use the [*Manage My Databases*](https://docs.cpanel.net/cpanel/databases/manage-my-databases/) interface (*cPanel » Home » Databases » Manage My Databases*).
> To change your server’s version of MySQL or MariaDB, contact your system administrator.
# Set up a database
To set up a database, perform the following steps:
1. In the *New Database* text box, enter a name for the database and click *Next Step*. The system limits the database name to 64 characters. However, due to the method that cPanel & WHM uses to store MySQL database names, each underscore character requires **two** characters of that limit. Therefore, if your hosting provider enabled database prefixing, the underscore character in the database prefix will use two characters of the 64-character database name limit. Each character in the database prefix will only use one character of the limit. You may name a database with any ASCII characters **except** the following:
* `/`
* `"`
* `'`
* ```
```
2. In the *Username* text box, enter a name for the user whom you wish to allow to manage the database. You may **only** enter alphanumeric characters. To limit the database prefix to eight characters, use the *Force short prefix for MySQL and MariaDB databases* setting in WHM’s [*Tweak Settings*](https://docs.cpanel.net/whm/server-configuration/tweak-settings) interface (*WHM* » *Home* » *Server Configuration* » *Tweak Settings*).
> \[!WARNING]
> Warning\
> Enabling the *Force short prefix for MySQL and MariaDB databases* setting in WHM’s [*Tweak Settings*](https://docs.cpanel.net/whm/server-configuration/tweak-settings) interface (*WHM* » *Home* » *Server Configuration* » *Tweak Settings*) will prevent you from creating new accounts that share the same first eight characters of their usernames. For more information about MySQL and MariaDB prefix settings, read our [Tweak Settings](https://docs.cpanel.net/whm/server-configuration/tweak-settings/#sql) documentation.
To learn more about database username limits, click your database type:
> \[!NOTE] > **MySQL 5.6 and earlier MySQL**
> 5.6 limits the database username to 16 characters. The system includes the database prefix (the first eight characters of the cPanel account’s username plus an underscore for a total of nine characters) in the character count for the username.
> For example:
> A MySQL database with the `db_` prefix allows usernames that contain up to 13 characters.
> A MySQL database with the `example_` prefix allows usernames that contain up to eight characters.
> \[!NOTE] > **MySQL 5.7 and later**\
> MySQL 5.7 limits the database username to 32 characters. The system includes the database prefix (the first 16 characters of the cPanel account’s username plus an underscore for a total of 17 characters) in the character count for the username.\
> For example:
> A MySQL database with the `db_` prefix allows usernames that contain up to 29 characters.
> A MySQL database with the `example_` prefix allows usernames that contain up to 24 characters.
> \[!NOTE] > **MariaDB**
> Limits the database username to 47 characters. The system includes the database prefix (all of the cPanel account’s username and an underscore character) in the character count for the username.\
> For example:
> A MariaDB database with the `db_` Prefix allows usernames that contain up to 44 characters
> A MariaDB database with the `example_` prefix allows usernames that contain up to 39 characters.
1. Enter and confirm the new password in the appropriate text boxes. Some web hosts require a minimum password strength. The system evaluates the password that you enter on a scale of 100 points. `0` indicates a weak password, while `100` indicates a very secure password. A green password *Strength* meter indicates that the password is equal to or greater than the required password strength. You may click *Password Generator* to generate a strong password. For more information, read our [*Password & Security*](https://docs.cpanel.net/cpanel/preferences/password-and-security) documentation.
2. Click *Create User*.
3. Select the checkboxes that correspond to the privileges that you want to grant the user, or select *ALL PRIVILEGES.* For more information about user privileges, read the [MySQL](http://dev.mysql.com/doc/) or [MariaDB](https://mariadb.com/kb/en/documentation/) documentation.
4. Click *Next Step*.
The system displays a message that states that you successfully set up the database and user account.
# Additional options
After you complete the database setup process, select one of the following options:
* *Add another database.* — Click to return to the beginning of the *Database Wizard* interface to add more databases.
* *Add another user to your database.* — Click to open the [*Manage My Databases*](https://docs.cpanel.net/cpanel/databases/manage-my-databases/) interface (*cPanel » Home » Databases » Manage My Databases*) to create additional user accounts and assign them to a database.
* *Return to Manage My Databases.* — Click to open the [*Manage My Databases*](https://docs.cpanel.net/cpanel/databases/manage-my-databases/) interface (*cPanel » Home » Databases » Manage My Databases*).
* *Return Home* — Click to return to the cPanel *Home* interface.
> \[!NOTE]
> Note
> When you use the *Database Wizard* interface to add a user and a database, the system automatically grants the user access to the database. You do **not** need to use the *Add User to Database* feature in the [*Manage My Databases*](https://docs.cpanel.net/cpanel/databases/manage-my-databases/) interface (*cPanel » Home » Databases » Manage My Databases*).