How to create MySQL user

To create a MySQL Database, log in to cPanel and click on MySQL Databases icon from the DATABASES section.

Enter the database name that you want on the box and click the Create Database button.

create new database

Your MySQL database will be created with the username_ automatically added before the name. For example, if you choose the name “mydatabase” and your cPanel username is abCd, then your newly created database name would be abCd_mydatabase

You can now also access your database from phpMyAdmin if you need to.

How to create MySQL user

If you scroll down to the middle of the page on the MySQL Databases page, you will find a section named MySQL Users. On the Add New User section, enter the username that you want to create, enter the password and confirm the password. Click on the Create User button and your MySQL user will be created.
You can see all your database users under the Current Users section.

sql users

How to connect MySQL database and user

Below the MySQL Users section, you can find the option to Add User to Database. With this option, you can assign a database user to a MySQL Database and grant permissions that needed. To do that, select the user from the User dropdown menu and database name from the Database dropdown menu then click on the Add button.

add user to database

On the next page, select the privileges that you want to assign to the user and click on the Make Changes button to save the changes.

Your database user has been added to the database successfully.

database-permissions

How to change MySQL user password

On the bottom of the MySQL Databases page on cPanel, you can see the list of MySQL users. From here, you can change the password for the user, rename the username and delete the user if needed. You can change your MySQL username if you forget it. To change MySQL user from here, click on the “Change Password” button.

current-database-users

On the next page, enter the new password and confirm the password on the 2nd box. Please choose a password that is strong with uppercase and lowercase character, numbers, and symbols so that it is secured and hard to break. You can also use the Password Generator to generate a secure password for you.

Now click on Change Password and your new password will be set for the MySQL user.

How to delete MySQL database

delete-current-database

MySQL database list can be found under the MySQL database section. Here you can search for your database name if needed. From the database list, click on the Delete button. The system will ask you for your confirmation on the deletion at the next page. Click on Delete Database button to confirm the deletion and your database will be deleted permanently.

confirm-delete-mysql-database

After your database has been successfully deleted, click on Go Back button to get back to the MySQL Databases page.

How to delete MySQL user

current-users-database

Click on the “Delete” button beside the user that you want to delete. On the next page, you will be asked to confirm the action. Click on the “Delete User” button to confirm your delete and the user will be permanently removed.

delete-current-users

If you still need any help regarding MySQL Databases for your account, feel free to contact us by opening a support ticket. We will get back to you as soon as we can.

Leave a Reply