Operation on MySQL® Databases

Overview
======================================================
-Path :- cPanel >> Home >> Databases >> MySQL Database Wizard

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

A database name may contain a maximum of 64 characters.

Due to the method that cPanel & WHM uses to store MySQL database names, each underscore character requires two characters of that limit.

If you enable database prefixing, a database name may contain a maximum of 63 characters, which includes the database prefix and the underscore character. Each additional underscore requires another two characters of that limit.

Create a database
To create a database, perform the following steps:

1)In the New Database text box, enter a name for the database.

2)Click Create Database. A new interface will appear.

3)Click Go Back. The new database appears in the Current Databases table.


==========================================================================
2) Remote MySQL Host

This section provides the remote MySQL server’s address configured by your hosting provider. You can use this host to connect to the MySQL server.


==========================================================================
3)Modify Databases
If you experience problems with a database, check your databases for errors.

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

In the Check Database menu, select the database that you wish to check.

Click Check Database. A new interface will appear, and the system will check whether the database functions correctly.

If the system detects a problem in the database, it displays the name of the corrupt table.
If the Check Complete message displays, the database functions correctly.
Click Go Back to return to the main interface.

Repair a database
If one of your databases becomes corrupt, you can attempt to repair it.

To repair a database, perform the following steps:

In the Repair Database menu, select the database that you wish to repair.

Click Repair Database. A new interface will appear, and the system will attempt to automatically repair the database.

If the system cannot repair the database, it will attempt to determine the source of the corrupt data.
If the Repair Complete message displays, the system successfully repaired the database.
Click Go Back to return to the main interface.

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.

To remove a user from a database, click the trashcan icon () for the desired user, and then click Revoke User Privileges from Database.
To modify a user’s privileges for a specific database, click the desired username, select and deselect checkboxes to configure the desired privileges, and then click Make Changes.
Actions — The available actions for this database. Click the appropriate icon in this column to rename or delete a database.

Rename: you can rename the database also.

===========================================================================

4)Add a user to a database

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

In the Add User To Database section of the interface, select the desired user and database from the menus.
Click Add. The MySQL Account Maintenance interface will appear.
Select the checkboxes that correspond to the privileges that you wish to grant to the user.

Click Make Changes.

Click Go Back to return to the main interface.

Following is the image for the same.

-Database  privileges

A privilege is permission to execute one particular type of SQL statement or access a second persons’ object. Database privilege controls the use of computing resources. Database privilege does not apply to the Database administrator of the database. 

 

 Note: once you add a database and its user you need to add privileges to the certain database.

 ===========================================================================

5)Current Users

The Current Users table lists all of your MySQL database users, and allows you to perform the following actions:

  • Change Password — Click to modify a database user’s password. Enter and confirm the desired password, and then click Change Password.
  • Rename — Click to rename a database user. Enter the desired username, and then click Change Username.
  • Delete — Click to permanently delete a database user, and then click Delete User to continue.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 7040