Articles on: cPanel Tutorial

How to Add and Assign User to MySQL Database

Login to your cPanel account.

Click on "MySQL Databases" as seen below

Type the name of your new database under “Create New Database” and press “Create Database”.

You shall see the message: “Added the database yourusername_newdatabase”. Hit the “Go back” button.

Now, scroll down to the bottom to “MySQL Users”. Enter your preferred username and password and hit “Create User”.

You can also choose a randomly generated password by selecting “Generate Password”.

You shall see the message “You have successfully created a MySQL user named “youruser_newdata”.” Hit the “Go Back” button.

Next, we scroll down to "Add Username to Database" section and assign our newly created username to our newly created database. In this example shown below, user "youruser_newdata" will be assigned to "youruser_newdatabase". Remember to hit the "Add" button.

Tick on “All Privileges” and hit the “Make Changes” button.

You shall see that your new user is now assigned to your new database.

Updated on: 10/08/2018

Was this article helpful?

Share your feedback


Thank you!