Server Good Life Summer Offers 50% Discount on All Hosting Packages.Coupon Code

Knowledgebase

Managing MySQL User Accounts Print

  • 2

For security, you have the ability to create individual MySQL users to use with one or more database each with their own unique username and password including what privileges each user has.

Creating a MySQL User

  • Login to cPanel
  • Click on MySQL Databases
  • Under the MySQL Users header, provide a username for the MySQL user (eg. forumusr)
  • In the password field type a unique password for the user that rates 6 or better in strength*
  • Confirm the password by typing it again
  • Click Create User

A new MySQL user will be created with the username format of webuser_mysqluser

Attaching MySQL Users to Databases

In order to access a database with a MySQL user account you will need to attach that user to the database.

  • Login to cPanel
  • Click MySQL Databases
  • Under the Add User to Database header, select the MySQL user from the first drop-down menu
  • Select the database the user will be added to under the second drop-down menu
  • Click Add
  • In the screen that appears you can select what privileges the user will have interacting with that database, you should select minimum privileges for security however if unsure click the box next to ALL PRIVILEGES
  • Click Make Changes

The MySQL user now has access to the selected database and the privileges selected.

Removing MySQL Users from Databases

  • Login to cPanel
  • Click MySQL Databases
  • Under the Current Databases header you will see a table of existing databases and users, locate the database you need to remove the user from
  • In the Users column, click the small circled X next to the MySQL user to remove
  • On the confirmation screen, click Yes

Removing MySQL User Accounts Completely

  • Login to cPanel
  • Click MySQL Databases
  • Under the Current Users header, locate the MySQL user account you wish to remove
  • Click the circled X icon in the adjacent Delete column next to that MySQL User
  • Click Yes on the confirmation screen

Changing a MySQL User Password

If changing a MySQL user password, you must remove the user from any database(s) it is attached to, remove the MySQL user account and then re-create it as if new and re-attach it to necessary database(s)


Was this answer helpful?
Back