cPanel Databases

The Databases section of cPanel is used to manage MySQL databases. It can be used to create, edit and view databases and manage users. Learn more about cPanel including how to log in here.

cPanel Databases section
cPanel Databases section

Creating a MySQL database

To create a MySQL database, click the MySQL Databases button in the Databases section. Alternatively, click the Databases button on the toolbar at the top of the page.

cPanel Databases tab
cPanel Databases tab

All database names start with the cPanel account name followed by an underscore and a suffix. Enter a suffix such as "db" in the text field and then click the Create Database button to create the database.

cPanel Add New MySQL Database
cPanel Add New MySQL Database

Creating a MySQL user

A user account is needed to connect to a MySQL database. To create a MySQL user, scroll down to the MySQL Users section on the MySQL Databases page. All MySQL usernames start with the cPanel account name followed by an underscore and suffix. Enter a suffix such as "usr" in the Username text field and then enter a password twice to confirm it is right.

cPanel Add New MySQL User
cPanel Add New MySQL User

It is possible to automatically generate a password by clicking the Password Generator button. A dialog will appear with a random password and options to change the length of the password, the case and whether it includes numbers and symbols. When finished, tick the I have copied this password to a safe place checkbox and then click the Use Password button.

cPanel Password Generator
cPanel Password Generator

After entering a password, click the Create A User button to create the MySQL user.

Adding a MySQL user to a database

A MySQL user needs permission to use a database. To do this, scroll down to the Add User to Database section on the MySQL Databases page. Select the MySQL user that was previously created in the User dropdown and select the MySQL database in the Database section. Click the Add button to add the user to the database.

cPanel Add MySQL User to Database
cPanel Add MySQL User to Database

After adding the user to the database, it will appear in the Current Databases section in the Privileged Users column.

cPanel Current MySQL Databases
cPanel Current MySQL Databases

Click on the username in the Privileged Users column to open a new page to change the user privileges. Click the All Privileges checkbox to give the user full access to the database and then click the Make Changes button to save the user privileges.

cPanel Manage MySQL User Privileges
cPanel Manage MySQL User Privileges

Managing a MySQL database

To manage a MySQL database, click the phpMyAdmin icon in the Databases section of cPanel. Learn more about phpMyAdmin here.