Our new customer portal is now live!
Guides

Create a database and database user

Create a MySQL or MariaDB database for an application and grant the required permissions.

6 min · Intermediate

Updated

In this guide

Before you start

You need a cPanel service that includes databases and the application's installation instructions. WP Toolkit normally creates a database during WordPress installation, so manual creation is useful for applications you install yourself.

Use the setup wizard

  1. Open Database Wizard. Older cPanel versions call it MySQL Database Wizard.
  2. Give the database a descriptive name and continue. cPanel may add an account-specific prefix.
  3. Create a dedicated database user for the application with a strong password. Save the complete names, including prefixes.
  4. Grant the permissions the application needs on this database. If installation requires ALL PRIVILEGES, grant them only for this database.
  5. Finish the wizard. It associates the new user with the new database.
  6. Enter the database name, user, password and the database hostname provided by your service in the application's configuration.

Test the connection

Run the application's installer or connection test. If it fails, check the full names, password and user-to-database association. Do not use your cPanel login in place of the application's database user.

Existing databases are managed in Manage My Databases, previously called MySQL Databases. Changing a database user's password requires updating the application with the same password. Deleting a database removes its content; take a backup before significant structural or permission changes.

Sources and further reading