This Article Includes: Creating a Database, Creating & Deleting Database User, Assigning User Privileges, Repairing Database.
The First Step is to log in to your cPanel Control Panel. You should be able to log in at: http://www.Your_Domain.com:2083 (where Your_Domain.com is your actual Domain).
After Logged In, Click on the “MySql Databases” Icon Under the “Databases” Heading.
Create a Database
To create the database:
1. In the New Database field, type a name for the database.
2. Click Create Database.
3. Click Go Back.
* The new database will appear in the Current Databases table.
Check a Database for Errors
If you are experiencing problems using any database related software you have installed on the server, you may check your databases for errors.
To check a database:
1. In the Check DB drop-down menu, select the database you wish to check.
2. Click Check DB.
* cPanel will run a script that checks to make sure the database is functional. The results will appear on a new screen.
o If cPanel detects a problem in the database, it will indicate which table is corrupted.
o If the Check Complete message appears without a notification that the database is corrupted, then the database is functional.
Repair a Database
If you have checked a database and found an error, you will need to repair it.
To repair a database:
1. In the Repair DB drop-down menu, select the database you wish to repair.
2. Click Repair DB.
3. cPanel will run a script that attempts to automatically repair the database.
Note: This will only attempt to repair the database. A repair may not be possible; in this case, you will be able to locate the source of the corrupt data.
Create a Database User
After you create the database, you will need to add users and their privileges so that the database can be filled and managed. Please note that MySQL user accounts must be created separately from mail and web administrator accounts.
To create a new user account:
1. To quickly access the MySQL Users interface, click Jump to MySQL Users.
2. Under Add New User, enter a username.
3. Enter a password in the Password field.
* note Note: The password must be 7 letters or shorter.
* For help generating a strong password, click the Password Generator button.
4. Retype the password in the Password (Again) field.
5. Click Create User.
Define a User’s Privileges
Privileges define how the user is able to interact with the database. For example, they will determine whether or not the user can add and delete information.
To define a user’s privileges:
1. Under Add User to Database, select a user from the User drop-down menu.
2. From the Database drop-down menu, select the database to which you wish to allow the user access.
3. Click Add.
4. From the MySQL Account Maintenance screen, select the privileges you wish to grant the user, or select ALL PRIVILEGES.
5. Click Make Changes.
The Current Databases Table
This table contains a list of databases on your server. For each database, the table displays:
* The name of the database.
* The size of the database.
* Users who may manipulate the database.
* A link allowing you to delete the database.
To search the Current Databases table:
1. Type your criteria in the Search field.
2. Click Go.
The table will display the search results.
Modify a User’s Privileges
To modify a user’s privileges for managing a database:
1. Click the user’s name where it appears in the appropriate row.
2. On the MySQL Account Maintenance screen, select the actions you wish to allow the user to perform, and deselect the actions you wish to prohibit.
3. Click Make Changes.
Remove a User From a Database
To disallow a user from managing a database:
1. Click the Circle_X_button.gif icon next to the user you wish to delete in the Current Databases table.
2. If you are sure you want to remove the user’s privileges to manage the database, click Yes.
Delete a Database
To delete a database from the server:
1. Locate the row corresponding to the database you wish to delete in the Current Databases table.
2. Click Delete Database.
3. If you are sure you want to permanently delete the database, click Yes.
Delete a MySQL User
To delete a MySQL user account:
1. Click Circle_X_button.gif in the appropriate row of the Current Users table.
2. If you are sure you want to permanently delete the account, click Yes.