How to Create a cPanel Database User

A database is not usable until a user has been created and granted access to it. If you used the MySQL Database Wizard, this was already done for you. Otherwise, do it manually.

Create the user

  1. In cPanel, open MySQL® Databases.
  2. Scroll to Add New User.
  3. Enter a username. It will be prefixed with your account name automatically.
  4. Use the Password Generator to create a strong password, and save it somewhere safe before continuing.
  5. Click Create User.

Grant access to the database

  1. Scroll to Add User To Database.
  2. Select the user and the database.
  3. Click Add.
  4. On the privileges screen, tick ALL PRIVILEGES and confirm.

Creating a user is not the same as granting it access. A user with no privileges on the database will be rejected with an access denied error, which looks identical to a wrong password.

Good practice

  • Use a separate user for each application. If one is compromised, the others are unaffected.
  • Never reuse your cPanel account password as a database password.
  • Remove users you no longer need rather than leaving them in place.
Was this article helpful?