Knowledgebase: Databases
MySQL Databases

Overview

This interface allows you to create, manage, and delete MySQL® databases and database users.

Create a database

To create the database, perform the following steps: 

  1. In the New Database text box, enter a name for the database.
  2. Click Create Database.
  3. Click Go Back. The new database will appear in the Current Databases table.

Modify Databases

Check a database

If you experience problems with a database on your server, check your databases for errors.

To check a database for errors, perform the following steps:

  1. In the Check DB menu, select the database that you wish to check.
  2. Click Check DB.
  3. cPanel will run a script that checks to ensure that the database is functional.
    • If cPanel detects a problem in the database, it displays the name of the corrupt table.
    • If the Check Complete message displays, that database is functional.

Repair a database

If one of your databases is corrupt, you will need to repair it.

To repair a database, perform the following steps:

  1. In the Repair DB menu, select the database that you wish to repair.
  2. Click Repair DB.
  3. cPanel will run a script that attempts to automatically repair the database.

Current Databases

This table contains a list of databases on your server.

For each database, the table displays the following information:

  • Database — The name of the database.
  • Size — The size of the database.
  • Privileged Users — Users who can manipulate the database.
  • Actions — Click the appropriate icon in this column to rename or delete a database.

Search databases

To search the Current Databases table, enter the desired criteria in the Search text box and click Go. The table will display the search results.

Modify a user's privileges

To modify a user’s privileges for database management, perform the following steps:

  1. Click the user’s name in the row that corresponds to the database for which you wish to modify privileges. The MySQL Account Maintenance interface will appear.
  2. Select the checkboxes that correspond to the privileges that you wish to grant to the user. Deselect any privileges that you do not wish to grant to the user.
  3. Click Make Changes.

Remove a user from a database

To remove a user from a specific database, perform the following steps:

  1. In the Privileged Users column, click next to the user that you wish to delete.
  2. If you are sure that you wish to remove the user from the database, click Revoke User Privileges.

Delete a database

To delete a database, perform the following steps:

  1. In the Current Databases table, click the Delete icon in the Actions column that corresponds to the database that you wish to delete.
  2. If you are certain that you want to permanently delete the database, click Delete Database.

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:

  1. Enter a username in the Username text box.
  2. Enter and confirm the new password in the appropriate text boxes.
  3. Click Create User.

Add a user to a database

When you add a user to a database, you must also select that user's privileges. Privileges define how the user interacts with the database. For example, they determine whether the user can add and delete information.

To add a user to a database, perform the following steps:

  1. Select a user from the User menu.
  2. Select the database to which you wish to allow the user access from the Database menu.
  3. Click Add. The MySQL Account Maintenance interface will appear.
  4. Select the checkboxes that correspond to the privileges that you wish to grant to the user.
  5. Click Make Changes.

Current Users

The Current Users table lists all of your MySQL users. Use the functions in this table to change user passwords, usernames, and delete users.

Change MySQL user's password

To change a MySQL user's password, perform the following steps:

  1. In the Current Users table, click the Set Password icon in the Actions column that corresponds to the user that you wish to change.
  2. Enter and confirm the new password in the appropriate text boxes.
  3. Click Change Password.

Change a MySQL user's name

To change a MySQL user's username, perform the following steps:

  1. Click the Rename icon in the Actions column for the user who you wish to rename.
  2. Enter the new username in the New Username text box.
  3. Click Change Username.

Delete a MySQL user

To delete a MySQL user account, perform the following steps:

  1. Click the Delete icon in the row that corresponds to the user that you wish to delete.
  2. If you are sure you want to permanently delete the account, click Delete MySQL Users.

 


Comments (0)