You are currently viewing How To Create MySQL Database on Cpanel

How To Create MySQL Database on Cpanel

When uploading a dynamic website, skills in creating a database and adding a user to the database are required. Different web applications have different syntaxes for connecting to the database, but the way to create the database remains the same. In this guide, we will cover how to create MySQL database, create a user and add the user to this database.

Requirements: Access to a panel

Method 1: How to create MySQL database and add a user using the MySQL Database wizard

Login to your Cpanel and search for MySQL database wizard from the search field.

create mysql database

Give your database a name. Note that your Cpanel username serves as the database name prefix. Then click Next.

create mysql database

Enter your preferred database username and password. Confirm the password and click on the Create user button. Ensure to note down the database credentials.

create mysql database

Click on All privileges check box to give the user the privileges of running the different tasks on the database and click on the Next Step button.

create mysql database

You have successfully created a database and a database user! You can now use the credentials to configure your web application.

Method 2: How to create MySQL database and a user on Cpanel the long way

Login to your Cpanel and search for Mysql database.

create mysql database

Enter your preferred database name and click on the Create database button as shown in the image below.

create mysql database

Scroll to the MySQL users:: Add new user section. Enter your preferred username and password and click on create user button.

create mysql database

How to add a user to MySQL database on Cpanel

Once a database is created, and a user is created, it’s time to add the user to the database. Just below the add new user section, scroll to Add User To Database section; still under the Mysql database page.

Select the user you wish to add to the database, and the database from the drop-down, and click add.

create mysql database

Click on the All privileges button to give the new user all the database privileges and click on make changes.

give database user privileges

Once done, the user is added to the referenced database and given all privileges.

How to reset a database user password in Cpanel

Having created a database, and added a user, you may forget the user password which is an entry required when connecting your website to a database. To reset a database user password, search for MySQL Databases from your Cpanel and click on the option.

reset database user password

Scroll to the bottom of this page, where a user list has been created. Next to the user, you intend to change the password for, click on Change password.

change password for user

Enter the new password and click on change password, to update the new password.

The described process should be as simple as illustrated. Should you face some challenges, reach out to us, by posting as a comment, or contacting us for assistance.

Web Hosting and email hosting Packages

For web development services, SEO services, Digital marketing strategies, website set up services, web hosting and domain registration; contact Dynamic Technologies.

Related content