How to set privileges to a MySQL user account in cPanel

March 22, 2023 / MySQL

This article explains how to set and manage privileges for a MySQL user account in cPanel. Assigning the correct permissions helps ensure database security and allows users to perform only the actions they are authorised to do.

To set MySQL user privileges in cPanel, follow these steps:

  1. Log in to cPanel.
  2. Navigate to the Databases section and click on Databases Wizard.
    database
  3. Follow the steps to set Privileges for a MySQL user account in cPanel:
    1. Create New Database: Enter the name of the “New Database”, and click on the “Create Database” button.
      create new database
    2. Create Database Users:
      1.  You will get a success message that the “MariaDB/MySQL database is created”.
      2. Enter the “Username” and “Password” and click on the “Create User” button. (Note- Username must be a maximum of 40 characters, and the password generator can be used for generating the password. However, the password should be very strong.
        database users
      3.  You will get a success message that a Database user has been created.
    3. Add User to Database:
      1. Enter the User and Database in the field provided.
      2. Click on the Add button.
        add users
    4. Manage User Privileges:
      1. Select the privileges as shown below.
      2. Click on Make Changes.
        User Privileges
      3. You will get a success message as follows.
        success
  4. Once you have set the privileges for the MySQL user account, the user will be able to perform the actions that you have allowed them to do on the selected database.

Ensure to check our latest web hosting plans and visit our Kb section for more such informative articles. Never hesitate to get in touch with our eukhost’s support team.

Spread the love