How to create and modify a database in WHM/cPanel server

To create and modify database for domain

MySQL database helps to manage large amount of information' s over the web easily. It is necessary to run the many web based applications such as bulletin boards, online shopping carts, and content management systems.

To create database for domain

Login to the WHM, click on Account information and select List Accounts options

It displays the list of created accounts. You can search with the domain name, IP address etc.

Now click on cPanel icon respective to the Domain name.

Now cPanel window appears. In the Databases section, select the MySQL databases.

To create Database

Here we will create a sample database named example_testdb. Now Click Create Database.

We have successfully created the database example_testdb.

To create MySQL user

To access the database we need to create MySQL user. Here, to access the example_testdb which is created, we have created a MySQL user called example_user.

You can enter the password manually, for security reasons we will generate the encrypted password using the password generator.

Now Click Create user.

Alert: You have successfully created MySQL user named example_user

To add user to specific database

Select the user to be added to the database and select the database and click add.

To manage user privileges

User: example_user
Database: example_testdb

For instance, Here we have given all privileges. You can manage the user privileges according to your requirement for the specific account.

Now the user can access the database with full privileges.

Click Make changes.

Now you have successfully given the requested privileges on the database " example_testdb" to the user " example_user"

Now you can overview the created database and the privileged users.

To change current database name

You can view the current database in the current database section. Here you can rename the database by selecting the rename option. A popup window appears to rename the database.

Important: It is potentially dangerous operation to rename MySQL database. You may need to take backup this database before renaming it.

You can enter the new database name that you prefer and click proceed. Once you click proceed, the database will be renamed and the page will now reload.

To rename MySQL user name

Go to current user section and select username to modify. Click rename. Popup screen appears

You can enter a new user name and click Proceed to change and the page will be reloaded.

To change MySQL User password

In the current user section, select the user for which the password has to be changed and select Change password icon.

New window appears.

Click Password generator for generating the encrypted password. Now copy and paste the password in the specified section.

To delete the database

Select the database to be deleted and click delete. It asks for confirmation, Click delete database.

Popup Message: Database has been successfully deleted.

Thus, this article explains how to create and manage the database in WHM/cPanel server.

Tag : WHM cPanel
FAQ
Q
How to delete the database in WHM/cPanel server?
A
ans: To be followed these steps to delete the database on WHM/cPanel server
* Select the database to be deleted and click Delete
* It asks for confirmation, Clicks delete the database
Q
How to change the MySQL User password in WHM/cPanel server?
A
* select the user for which the password has to be changed
* And select Change password icon
* Now you can change it
Q
How to manage user privileges in WHM/cPanel server?
A
To follow the steps to managing user privileges
*You can manage the user privileges according to your requirement for the specific account
* user can access the database with full privileges
Q
How to create the database for a domain in WHM/cPanel server?
A
There are few steps followed for creating a database in the domain
*Login to the WHM, click on Account information and select List Accounts options
*It displays the list of created accounts. You can search with the domain name, IP address etc
*Now click on cPanel icon respective to the Domain name
Q
How to add a user to the specific database in WHM/cPanel server?
A
Follow these steps to add a user in a specific database
*Select the user to be added to the database and select the database and click add.installing the following dependent package to resolve this issue
yum -y install ImageMagick-devel I