How to Create and Assign a Database User

How to Create and Assign a Database User

Create A New Database User

    1. In cPanel, select "MySQL Databases".
    2. Find the "MySQL Users" section.
    3. Enter a username under "Add New User". Usernames are maximum 7 characters.
    4. Enter a password in the "Password" field. You can also use the "Generate Password" option to let cPanel generate a strong password for you.
    5. Click "Create User".

Assigning A User To A Database

  1. Using the "User" dropdown menu under the "Add User To Database" section, select your newly created user.
  2. From the "Database" dropdown menu, choose the database you wish to assign the user to.
  3. Click "Add".
  4. Navigate to the MySQL Account Maintenance screen and choose which privileges you wish to assign to the user.
  5. Click "Make Changes"

You will now need to update the site's configuration code to reflect the changes in database username and password.

  • 40 Users Found This Useful
Was this answer helpful?

Related Articles

Do you offer password protected directories?

By default, cPanel allows you to password protect directories in your account that you wish to...

Why can't I log into my cpanel or webmail?

There various issues that you may not be able to login to your cPanel or WebMail. We have...

Custom Error Pages

Creating your own error pages can be accomplished through cPanel. After logging in, under...

Requesting a New cPanel Password

Resetting Your cPanel PasswordYou can reset your cPanel password from the cPanel login screen....

Secure cPanel Login

Using Shared SSL to Access cPanel Use https, enter your site's IP address, and the secure port...