How To Set Up A MySQL Database On cPanel
How To Set Up A MySQL Database On cPanel
Use this interface to create, manage, and delete MySQL® databases and database users.
Create a database
To create a database, perform the following steps:
In the New Database text box, enter a name for the database.
Click Create Database. A new interface will appear.
Click Go Back. The new database appears in the Current Databases table.
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.
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.
Note: To grant all of the available privileges to the user, select the ALL PRIVILEGES checkbox.
Click Make Changes.
Click Go Back to return to the main interface.
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.