KnowledgebaseHow can we help you?

Overview

Use this interface to create, manage, and delete MySQL® databases and database users.

Create a database

To create a database, perform the following steps:

  1. In the New Databasetext box, enter a name for the database.
  2. Click Create Database.
  3. ClickGo Back. The new database appears in the Current Databases

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 a Databasemenu, select the database that you wish to check.
  2. Click Check the Database.
  3. cPanel runs a script that checks to ensure that the database functions correctly.
    • If the system detects a problem in the database, it displays the name of the corrupt table.
    • If the Check Completemessage displays, the database functions correctly.

Repair a database

If one of your databases is corrupt, you must repair it.

To repair a database, perform the following steps:

  1. In the Repair the Databasemenu, select the database that you wish to repair.
  2. Click Repair the Database.

cPanel runs a script that attempts to automatically repair the database.

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.
  • Actions— Click the appropriate icon in this column to rename or delete a database.

Modify a user's privileges

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

  1. Click the username in the row that corresponds to the database for which you want to modify privileges. The MySQL Account Maintenanceinterface appears. 

Note:

Ensure that you select the correct database. Users may have access to more than one database.

  1. Select the checkboxes that correspond to the privileges that you want to grant to the user. Deselect any privileges that you do not wish to grant to the user.
  2. Click Make Changes.

For more information about user privileges, read the MySQL documentation.

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 the  icon next to the user that you want to delete.
  2. To remove the user from the database, click Revoke User Privileges.

Rename a database

To rename a database, perform the following steps:

  1. In the Current Databasestable, click the Rename icon () in the Actions column that corresponds to the database that you wish to delete.
  2. Enter the new database name in the New nametext box.
  3. Click Proceed.

How cPanel renames a MySQL database

MySQL does not allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps:

  1. The system creates a new database.
  2. The system moves data from the old database to the new database.
  3. The system recreates grants and stored code in the new database.
  4. The system deletes the old database and its grants.

Delete a database

To delete a database, perform the following steps:

  1. In the Current Databasestable, click the Delete icon () in the Actions column that corresponds to the database that you wish to delete.
  2. 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 Usernametext box. 
  2. Enter and confirm the new password in the appropriate text boxes.
  3. Click Create User.

Add a user to a database

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

  1. Select the appropriate user and the database you want to add the user to from the Userand Database
  2. Click Add. The MySQL Account Maintenanceinterface appears.
  3. Select the checkboxes that correspond to the privileges that you wish to grant to the user.
  4. Click Make Changes.

For more information about user privileges, read the MySQL documentation.

Current Users

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

Change MySQL user's password

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

  1. In the Current Userstable, 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.
    • Click Password Generatorto generate a strong password. For more information, read our Password Generator
  3. Click Change Password.

Change a MySQL user's name

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

  1. Click the Renameicon () in the Actions column for the user who you wish to rename.
  2. Enter the new username in the New Usernametext box. 
  3. Click Change Username.

Delete a MySQL user

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

  1. Click the Deleteicon () in the row that corresponds to the user that you wish to delete.
  2. To permanently delete the account, click Delete MySQL Users.

 

Was this answer helpful?

Also Read



+91 9569505379 (Till Covid -19 Outbreak)
10:00 am to 7:30 pm IST Monday to Saturday
Live Chat, Email and Tickets are available 24/7

HostAdvice Great Uptime Award for Gen X Web Hosting
Gen X Web Hosting Reviews