How do I assign a user to a database in cPanel?

By Gbz • November 21, 2023

After creating a database and a user, you can assign the user to the database in cPanel:

  1. Go to the ‘Databases’ section in cPanel and select ‘MySQL Databases.’
  2. Scroll to the ‘Add User to Database’ section, select the user and the database from the respective drop-down menus.
  3. Click ‘Add’ and then select the appropriate privileges for the user on the database.
  4. Finally, click ‘Make Changes’ to complete the assignment.

Good to Know: Assigning specific privileges to users helps maintain database security by ensuring users can only perform tasks necessary for their role.

This post is brought to you by Gbz. GBz is affordable hosting for everyday websites. It is designed to get sites online quickly without unnecessary setup, while keeping costs low. GBz suits small business projects and client work. Jointly authored by Yasser Masood and Khadeeja Yasser.

Back to the Blog