Repair a database
If one of your databases becomes corrupt, you can attempt to repair it.
To repair a database, perform the following steps:
- In the Repair Database menu, select the database that you wish to repair.
- Click Repair Database. A new interface will appear, and the system will attempt to automatically repair the database.
- If the system cannot repair the database, it will attempt to determine the source of the corrupt data.
- If the Repair Complete message displays, the system successfully repaired the database.
- Click Go Back to return to the main interface.
Current Databases
The Current Databases table lists the following information for each database in your account:
- Database — The name of the database.
- Size — The size of the database.
-
Privileged Users — The users who can manipulate the database.
Note:
When you modify database users, make certain that you modify the user's access to the correct database. Users may have access to more than one database.
-
To remove a user from a database, click the trashcan icon () for the desired user, and then click Revoke User Privileges from Database.
- To modify a user's privileges for a specific database, click the desired username, select and deselect checkboxes to configure the desired privileges, and then click Make Changes.
-
- Actions — The available actions for this database. Click the appropriate icon in this column to rename or delete a database.
Rename a database
To rename a database, perform the following steps:
- In the Current Databases table, click Rename for the desired database.
- Enter the new database name in the New name text box.
- Click Proceed.
MySQL does not allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps:
- The system creates a new database.
- The system moves data from the old database to the new database.
- The system recreates grants and stored code in the new database.
- The system deletes the old database and its grants.
Delete a database
To delete a database, perform the following steps:
- In the Current Databases table, click Delete for the desired database.
- To permanently delete the database, click Delete Database.
- Click Go Back to return to the main interface.
Add a MySQL user
After you create a database, add users to the database and configure their privileges.
To create a new user account, perform the following steps:
-
Enter a username in the Username text box.
-
Enter and confirm the new password in the appropriate text boxes.
-
Click Create User.
- Click Go Back to return to the main interface.
Add a user to a database
To add a user to a database, perform the following steps:
- In the Add User To Database section of the interface, select the desired user and database from the menus.
- Click Add. The MySQL Account Maintenance interface will appear.
-
Select the checkboxes that correspond to the privileges that you wish to grant to the user.
-
Click Make Changes.
- Click Go Back to return to the main interface.
Current Users
The Current Users table lists all of your MySQL database users, and allows you to perform the following actions:
- Change Password — Click to modify a database user's password. Enter and confirm the desired password, and then click Change Password.
- Rename — Click to rename a database user. Enter the desired username, and then click Change Username.
- Delete — Click to permanently delete a database user, and then click Delete User to continue.