MySQL Databases
Contents
Goal................................................................................................................................................... 2
1. Create a Database.......................................................................................................................... 2
2. Check a Database
for Errors.......................................................................................................... 3
3. Repair a Database.......................................................................................................................... 3
4. Create a Database
User................................................................................................................. 4
5. Define a User’s
Privileges............................................................................................................... 4
6. The Current
Databases Table.......................................................................................................... 5
7. Search Databases........................................................................................................................... 6
8. Modify a User's
Privileges.............................................................................................................. 6
9. Remove User from
Database.......................................................................................................... 6
10. Delete a
Database........................................................................................................................ 7
Conclusion......................................................................................................................................... 8
Databases offer a method for managing large
amounts of information easily over the web. They are necessary to run many
web-based applications such as bulletin boards, content management systems, and
online retail shops. After reading this document, you will be able to create
and manage databases within cPanel. We have divided the database management in
cPanel into the following 10 sections:
- Create a Database
- Check a Database for Errors
- Repair a Database
- Create a Database User
- Define a User's Privileges
- The Current Databases Table
- Search Databases
- Modify a User's Privileges
- Remove a User From a Database
- Delete a Database
To create the database, please follow the
steps below:
- Login to the cPanel of the particular account using
IPADDRESS:2082 and the login details we had provided to you when you created
your account in WHM.
- Click on MySQL®
Databases in the Databases section.

- In the New Database field, type a name for the database.
- Click Create Database.
- Click Go Back. (The new database will appear in the Current
Databases table).

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, please follow the steps below:
- Login to cPanel and click on MySQL® Databases in the Databases section.
- In the Check DB drop-down menu, select the database you
wish to check.
- 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.

3. Repair a
Database
If you have checked a database and found an
error, you will need to repair it.
- Login to cPanel and click on MySQL® Databases in the Databases section.
- In the Repair DB drop-down menu, select the database you
wish to repair.
- Click Repair DB.
cPanel will run a script that attempts to
automatically repair the database.

After you create the database, you will
need to add users and their privileges so that the database can be filled and
managed. To create a new user account, please follow the steps below:
- Login to cPanel and click on MySQL® Databases in the Databases
section.
- In the Add New User section, enter a username.
- Enter a password in the Password field.
- Retype the password in the Password (Again) field.
- Click Create User.

5.
Define a User’s Privileges
Privileges define how a user is able to
interact with the database. For example, you can determine whether or not the
user can add and delete information. To define a user’s privileges, please
follow the steps below:
- Login to cPanel and click on MySQL® Databases in the Databases
section.
- In the Add User To Database section, please select a
user from the User drop-down menu.
- From the Database drop-down menu, please select the
database to which you wish to allow the user access.
- Click Add.
-
On the MySQL Account Maintenance screen, please select
the privileges you wish to grant the user, or select ALL PRIVILEGES.
- Click Make Changes.

This table contains a list of databases on
your server. For each database, the table displays the following:
- The name of the database.
- The size of the database.
- Users who may manipulate the database.
- A link allowing you to delete the database.

7.
Search Databases
To search the Current Databases
table, please follow the steps below:
- Login to cPanel and click on MySQL® Databases in the Databases
section.
- Type your criteria in the Search field.
- Click Go.
The table will display the search results.

To modify a user’s privileges for managing
a database, please go through the steps below:
- Login to cPanel and click on MySQL® Databases in the Databases
Section.
- Click the user’s name where it appears in the appropriate row.
- 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.
- Click Make Changes.

To stop a user’s access to a database:
- Login to cPanel and click on MySQL Databases in the Databases
section.
- Click the close icon next to the user you wish to delete
in the Current Databases table.
- If you are sure you want to remove the user’s privileges to
manage the database, click Yes.


10.
Delete a Database
To delete a database from the server,
please follow the steps below:
- Login to cPanel and click on MySQL® Databases in the Databases
section.
- Locate the row corresponding to the database you wish to delete
in the Current Databases table.
- Click Delete Database in the Actions column.
- If you are sure you want to permanently delete the database,
click Yes.


After reading this article, you should be
able to create and manage database users and databases through cPanel. If you
encountered any issues with this guide, please also note that there is
additional information available in our Wiki database at
http://myhosting.com/kb. Finally, we encourage you to contact our technical
support team by email at vps@myhosting.com, or calling us at 1-866-289-5091
with any questions or concerns.