How to Manage MySQL Users in cPanel

MySQL is a powerful database server that you can use in conjunction with server-side scripting like PHP to enhance your websites with dynamic content.  By default, the only way to manage MySQL is from the command line. Fortunately, there are web-based tools like phpMyAdmin and cPanel that provide other options.

In cPanel, you can create and manage databases, add and remove users, and grant permissions to users.  To begin log into cPanel, navigate to the Databases section, and click “MySQL Databases”.

To create a new database, simply type in the name suffix in the first box and click “Create Database”.  The new database will not have a user assigned to it, so to access it, you will need to assign a current user or create a new one.

In the “Add New User” section, type in the name suffix of the new user followed by a password.  If it tells you that your password is weak, consider using the password generator.  Then, click “Create User”. Finally, to assign the user to a database, select the user from the first drop-down menu and then select the database from the second.  Then, click “Add”.

The next screen will show you a list of privileges so that you can specify what type of access you want the user to have to the database.  For example, you might want to give CREATE privileges but not DELETE privileges.  In most cases, however, you can check the “ALL PRIVILEGES” box and then click “Make Changes” to finalize the assignment.