Portal Home > Knowledgebase > Databases > MySQL Databases


MySQL Databases




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.

If you need to create a database as well as the account that will access it, we recommend using the MySQL Database Setup Wizard. Alternatively, you may create a database, add users, and link a database to an existing user account using this screen.

 

  • Create a Database
  • Check a Database for Errors
  • Repair a Database
  • Create a Database User
  • Define a User's Privleges
  • The Current Databases Table
  • Search Databases
  • Modify a User's Privileges
  • Remove a User From a Database
  • Delete a Database
  • Delete a MySQL User

Create a Database

To create the database:

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

Check a Database for Errors

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:

  1. In the Check DB drop-down menu, select the database you wish to check.
  2. 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.
      • If cPanel detects a problem in the database, it will indicate which table is corrupted.
      • 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:

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

 Note: 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. Please note that 1MySQL user accounts must be created separately from mail and web administrator accounts.

To create a new user account:

  1. To quickly access the MySQL Users interface, click Jump to MySQL Users.
  2. Under Add New User, enter a username.
  3. Enter a password in the Password field.
    • Note: The password must be 7 letters or shorter.
    • For help generating a strong password, click the Generate Password button.
  4. Retype the password in the Password (Again) field.
  5. Click Create User.

Define a User's Privleges

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

To define a user’s privileges:

  1. Under Add User to Database, select a user from the User drop-down menu.
  2. From the Database drop-down 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 name of the database.
The size of the database.
Users who may manipulate the database.
A link allowing you to delete the database.

Search Databases

To search the Current Databases table:

  1. Type your criteria in the Search field.
  2. Click Go.


The table will display the search results.

Modify a User's Privileges

To modify a user’s privileges for managing a database:

  1. Click the user’s name where it appears in the appropriate row.
  2. 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.
  3. Click Make Changes.

Remove a User From a Database

To disallow a user from managing a database:

  1. Click the X icon next to the user you wish to delete.
  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:

  1. Locate the row corresponding to the database you wish to delete.
  2. Click Delete Database.
  3. If you are sure you want to permanently delete the database, click Yes.

 

Delete a MySQL User

To delete a MySQL user account:

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


To enter new information into a database, you can use the phpMyAdmin client installed with cPanel. For more information regarding phpMyAdmin visit http://www.phpmyadmin.net.



Was this answer helpful?

Print this Article Print this Article

Also Read
Remote MySQL (Views: 951)
phpMyAdmin (Views: 1020)
MySQL Database Wizard (Views: 1077)

Powered by WHMCompleteSolution

Language: