Righthand Media
Client Login Contact Us
Back to Knowledge Base
Databases

How to create a MySQL database and user

Create a database, database user and assign permissions in cPanel.

Updated 15 May 2026

How to create a MySQL database and user

Many websites and applications need a MySQL database to store content and settings.

Steps

  1. Log in to cPanel.
  2. Open MySQL Databases.
  3. Create a new database.
  4. Create a new database user with a strong password.
  5. Add the user to the database.
  6. Select the required privileges. For most website installs, choose All Privileges.
  7. Save the changes.

Database naming

cPanel often prefixes database names and usernames with your cPanel username, for example accountname_dbname.

Connection details

For most sites hosted on the same cPanel account, the database host is localhost.