This article describes how to use cPanel to manage MySQL databases and users. You can add, modify, and delete databases and users, as well as manage user database permissions.
<iframe src="https://www.youtube.com/embed/e6HQafFRwEc" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
MANAGING DATABASE USERS
To access MySQL databases, you must first create at least one user. The following procedures describe how to manage MySQL database users using cPanel.
Creating a database user
To create a MySQL database user, follow these steps:
Note: You can click Password Generator and cPanel generates a random, strong password for you. |
5. Click Create User.
Changing a user's password
You can change a database user's password. You may want to do this for security reasons (changing passwords periodically is a good security practice), or you may need to do this if you forget the password.
To change a MySQL user's password, follow these steps:
Note: You can click Password Generator and cPanel generates a random, strong password for you. |
4. Click Change Password. The new password takes effect immediately.
Renaming a user
To rename a MySQL user, follow these steps:
Deleting a user
When you delete a user, the user and its database permissions are deleted.
To delete a MySQL user, follow these steps:
MANAGING DATABASES
After you create a database user, you are ready to create a database and associate the user with the new database.
Creating a database
To create a MySQL database, follow these steps:
Note: When you create a database, your username is added to the database name. For example, if your username is username, and you create a database named database, the actual MySQL database name is username_database. |
Adding a user to a database
To add a MySQL user to a database, follow these steps:
Checking and repairing a database
You can check MySQL databases for errors or possible corruption. If a database check reveals problems, you can repair the database as well.
To check and repair a database, follow these steps:
3. If a database check indicates problems with a database, you can repair it:
Removing a user from a database
When you remove a user from a database, the user can no longer access the database.
To remove a MySQL user from a database, follow these steps:
Deleting a database
Before you delete a database, make sure that you have a backup copy if you want to save any information that it contains.
Note: When you delete a database, its associated users are not deleted. However, all permissions users have for that database are deleted. |
To delete a MySQL database, follow these steps: