Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to give a user all privileges on a MySQL database in cPanel

This guide shows you how to let a database user do everything on one database, using the MySQL Databases tool in cPanel.

cPanel2 min read10 steps4 screenshots

What do these words mean?

A database is an organised store of information for your site, such as posts, users or orders. MySQL is a popular type of database. A database user is a login that a program uses to open the database. A privilege is a permission, like permission to read, add, change or delete data.

Giving All Privileges means the user can do all of these things on that database. Most websites such as WordPress need this.

Warning: A user with all privileges can delete the whole database. Give it only to apps you trust. Take a backup first.

Steps

  1. Log in to your cPanel account.
    Screenshot: Log in to your cPanel account.
  2. In the Databases section, open MySQL Databases.
  3. If you do not have a database yet, type a name under Create New Database and click Create Database.
  4. If you do not have a user yet, scroll to MySQL Users. Type a username and a strong password. Click Create User.
  5. Scroll to Add User To Database.
    Screenshot: Scroll to Add User To Database .
  6. Pick the user from the User list.
  7. Pick the database from the Database list.
  8. Click Add.
  9. On the next page, tick the box ALL PRIVILEGES. This ticks every box below it.
  10. Click Make Changes.

You will see a message that the user now has access to the database.

Fix an existing user

If a user already has the database but with fewer rights, scroll to Current Databases. Click the user name next to the database. This opens the same privilege page. Tick ALL PRIVILEGES and click Make Changes.

Good to know

  • cPanel adds your account name before database and user names. For example, account_shop. Use the full name in your app.
  • Use one user for each site. Do not share one login everywhere.
  • Pick a long password with letters, numbers and symbols.
Tip: cPanel limits users to their own databases. You cannot give rights over other accounts. If you need something special, ask Hostvento support.

Quick recap

  • Privileges are permissions for a database user.
    Screenshot: Privileges are permissions for a database user.
  • Use MySQL Databases in cPanel.
  • Under Add User To Database, pick the user and database, then click Add.
    Screenshot: Under Add User To Database , pick the user and database, then click Add .
  • Tick ALL PRIVILEGES and click Make Changes.
  • Back up first and keep passwords strong.