Managing MySQL User Accounts

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?

Related Articles

Using FTP to Manage Files

To use FTP to manage files you will need three key pieces of information... Your Username (eg....

Managing Database Data with phpMyAdmin

phpMyAdmin is a de facto standard for administrating databases in an easy point-n-click manner...

How to transfer your accounts from your old host

- login to cPanel- click backups- click 'Home Directory' under Partial Backups- choose a location...

How to manage files via cPanel File Manager

You can also use the built-in File Manager capabilities of your cPanel which is easy and doesn't...

How to enable Remote MySQL Usage/Management

If you need to connect to your databases remotely through MySQL management software such as MySQL...