MySQL Databases: Add, Configure, Delete

Overview

Databases allow you to manage 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.

Create a new 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.
    1. Click Go Back. (The new database will appear in the Current Databases table.)

To enter new information in a database, you can use the phpMyAdmin client that is installed with cPanel. For more information about phpMyAdmin, visit the phpMyAdmin website.

Modify Databases

Check a database for errors

If you experience problems with any database related software you have installed on the server, check your databases for errors.

To check a database, perform the following steps:

  1. In the Check DB menu, select the database that you wish to check.
  2. Click Check DB.

cPanel will run a script that checks to make sure the database is functional.

  1. If cPanel detects a problem in the database, it will indicate which table is corrupted.
  2. 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, 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.

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. MySQL® user accounts must be created separately from mail and web administrator accounts.

To create a new user account, perform the following steps:

  1. To quickly access the MySQL Users interface, click Jump to MySQL Users.
  2. Under Add New User, enter a username.
  3. Enter and confirm the new password in the appropriate text boxes.
  4. Click Create User.

The system grades the password that you enter on a scale of 100 points. 0 indicates a weak password, while 100 indicates a very secure password.

Some web hosts require a minimum password strength. A green password Strength meter indicates that you met the required password strength.

Click Password Generator to generate a strong password. For more information, read our Password Generator documentation.

Define a user’s privileges

Privileges define how the user is able to interact with the database. For example, they will determine whether the user can add and delete information.

To define a user’s privileges, perform the following steps:

  1. Under Add User to Database, select a user from the User menu.
  2. From the Database 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 following information:

  1. The name of the database.
  2. The size of the database.
  3. Users who may manipulate the database.
  4. A link allowing you to delete the database.

Search databases

To search the Current Databases table, perform the following steps:

  1. Type your criteria in the Search text box.
  2. 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 where it appears in the appropriate row.
  2. On the MySQL Account Maintenance interface, select the actions that you wish to allow the user to perform, and deselect the actions that you wish to prohibit.
  3. Click Make Changes.

Remove a user from a database

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

  1. Click the  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, perform the following steps:

  1. Locate the row that corresponds 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.

The Current Users table

Change a MySQL user’s password

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

  1. In the Current Users table, click the username for which you wish to change the password.
  2. Enter the current password for the user in the Old Password text box
  3. Enter and confirm the new password in the appropriate text boxes.
  4. Click Change Password.

The system grades the password that you enter on a scale of 100 points. 0 indicates a weak password, while 100 indicates a very secure password.

Some web hosts require a minimum password strength. A green password Strength meter indicates that you met the required password strength.

Click Password Generator to generate a strong password. For more information, read our Password Generator documentation. Click Change Password.

Delete a MySQL user

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

  1. Click  in the appropriate row of the Current Users table.
    1. If you are sure you want to permanently delete the account, click Yes.

December 13, 2014   843    CPanel / WHM  
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?


Leave a Comment