Knowledgebase: cPanel
HOW TO: Manage Databases and Database Users in cPanel
Posted by on 20 April 2018 11:01 AM

MANAGING DATABASES

 

Creating a database

To create a MySQL database, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.




  2. Under Create New Database, type the name of the database in the New Database text box.
  3. Click Create Database.


Adding a user to a database

To add a MySQL user to a database, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.
  2. Under Add User to Database, select the user that you want to add in the User list box.
  3. In the Database list box, select the database.
  4. Click Add.



  5. Click the check boxes to grant the user specific privileges, or click the ALL PRIVILEGES check box to grant the user all permissions to the database.
  6. Click Make Changes.


Checking and repairing a database

You can check MySQL databases for errors or possible corruption. If a database check reveals problems, you can repair the database as well.

To check and repair a database, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.
  2. To check a database:
    • Under Modify Databases, select the database in the Check DB list box.
    • Click Check DB.



  3. If a database check indicates problems with a database, you can repair it:
    • Under Modify Databases, select the database in the Repair DB list box.
    • Click Repair DB.



Deleting a database

Before you delete a database, make sure that you have a backup copy if you want to save any information that it contains.

To delete a MySQL database, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.
  2. Under Current Databases, locate the database that you want to delete, and then click Delete Database.
  3. Click Delete Database to confirm the deletion.

 

MANAGING DATABASE USERS

To access MySQL databases, you must first create at least one user. The following procedures describe how to manage MySQL database users using cPanel.

Creating a database user

To create a MySQL database user, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.
  2. Under Add New User, type the MySQL username in the Username text box.
  3. In the Password text box, type the user password.
  4. In the Password (Again) text box, retype the user password.
  5. Click Create User.



Changing a user's password

You can change a database user's password. You may want to do this for security reasons (changing passwords periodically is a good security practice), or you may need to do this if you forget the password.

To change a MySQL user's password, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.
  2. Under Current Users, locate the user for which you want to change the password, and then click Set Password.
  3. In the Password and Password (Again) text boxes, type the new password.
  4. Click Change Password. The new password takes effect immediately.



Renaming a user

To rename a MySQL user, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.
  2. Under Current Users, locate the user that you want to rename, and then click Rename.
  3. In the text box, type the new name, and then click Proceed.



Deleting a user

When you delete a user, the user and its database permissions are deleted.

To delete a MySQL user, follow these steps:

  1. In the Databases section of the cPanel home screen, click MySQL® Databases.
  2. Under Current Users, locate the user that you want to delete, and then click on delete
  3. Click Delete User to confirm the deletion.



(0 vote(s))
Helpful
Not helpful

Comments (0)
Copyright © 1998 - 2021 Shinjiru International Inc. All Rights Reserved.