Creating a MySQL database in cPanel

Databases Updated Jan 15, 2026

Set Up a New Database

Databases store data for WordPress, web applications, and custom scripts.

Creating a Database

  1. Log in to cPanel
  2. Go to MySQL Databases
  3. Under "Create New Database", enter a name
  4. Click Create Database

Creating a Database User

  1. Scroll to "MySQL Users"
  2. Enter a username
  3. Enter a strong password (use the generator)
  4. Click Create User

Connecting User to Database

  1. Scroll to "Add User To Database"
  2. Select the user from dropdown
  3. Select the database from dropdown
  4. Click Add
  5. Select ALL PRIVILEGES
  6. Click Make Changes

Connection Details

SettingValue
Hostlocalhost
Databaseusername_dbname
Usernameusername_dbuser
PasswordYour chosen password
Note: Database and user names are prefixed with your cPanel username (e.g., cpuser_mydb).

Was this article helpful?