Cloud Service >> Knowledgebase >> cPanel >> How to Grant all Privileges to a User in MySQL with cPanel?
submit query

Cut Hosting Costs! Submit Query Today!

How to Grant all Privileges to a User in MySQL with cPanel?

MySQL is a popular relational database management system. It is widely implemented for the production of data for websites or applications. If you are using your MySQL databases through cPanel to manage users, crediting privileges to a user can be done with no effort. 

In the following guide, we will break down the process of allocating all privileges to a user in MySQL via cPanel step by step.

Let’s get started!

Accessing MySQL Databases in cPanel

Follow these steps:

  • You can access your cPanel account by logging in with the details. These details can be obtained by your hosting provider.

  • Open the Databases tab– then find the MySQL Databases symbol and click on it.

Creating a MySQL Database User

If you have not yet established a user for your MySQL database, you must do so before providing rights. Here's how.

  • Scroll down to the MySQL Users section in cPanel.

  • Enter the new MySQL user's username and password in the boxes given.

  • To create the user, simply click the "Create User" button.

Adding User to Database

Once you've created the MySQL user, you'll need to add the user to the database that you want to grant privileges for. Follow these steps

  • Scroll down to the Add User to Database section in cPanel.

  • Choose the user you created from the User dropdown menu.

  • Choose the database for which you wish to provide rights from the Database dropdown menu.

  • Click the "Add" button to add the person to the database.

Granting Privileges to the User

Now that you've added the user to the database, you can proceed to grant privileges. Follow these steps:

  • Scroll down to the MySQL Account Maintenance section in cPanel.

  • Select the user you added from the User dropdown menu.

  • From the Database dropdown menu, select the database to which you have added the user.

  • To allow the user full privileges, use the "All Privileges" option.

  • Click on the "Make Changes" button to save the privileges.

Verifying Privileges

After granting the user access, you may wish to double-check that they were properly applied. Here's how.

Access the MySQL Databases section in cPanel.

  • Scroll down to the Current Databases section and locate the database you granted privileges for.

  • Click on the "Permissions" link next to the database.

  • Verify that the user you granted privileges to is listed with all privileges enabled.

  • Troubleshooting

Still, encounter any issues while granting privileges to a user in MySQL with cPanel? Here are a few troubleshooting steps you can tr

  • Double-check the username and password for the MySQL.

  • Make sure the user is added to the correct database.

  • Verify that the MySQL server is running correctly on your hosting environment.

  • Check for any error messages displayed in cPanel or in the MySQL error logs.

Final Words

For a dot-com rule, giving a user cPanel in the `MySQL` environment is a basis for the administration of a database for your site or application. These instructions detailed in the knowledge base will surely make it simple for you to make users privileges, accordingly, and give them the appropriate access to do their jobs.

Whether you are using a cloud server or shared hosting environment to host your MySQL databases or users, cPanel gives you a user-friendly way of managing your MySQL databases and users.

 

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!