Home Web Hosting Cloud Servers Domains About Contact
Sign In

How to Create MySQL Database Print

  • cpanel, mysql, mysql database, database, db, add db, add database
  • 164

How to Create MySQL Database

Every website needs a place to store its data. Here, we’ll create a database for your website, along with creating and permitting a user to access it.

Step 1. Access the MySQL Databases

Once logged in, navigate to the MySQL Databases tool.

mysql databases tool in cpanel

Step 2. Create a New MySQL Database

You’ll be directed to the MySQL Databases window. To create a database, input the name (without spaces) in the appropriate field and click Create Database. Once done, click Go Back.

create a new database

Step 3. Create and Add New MySQL User

When you scroll down, you’ll find the Add New User form available. When filling it out, enter the username without spaces. Enter your password and repeat it.

You can also use the Password Generator to create a stronger password combination. If you did, click I have copied this password in a safe place and click Use Password.

Once done, click Create User.

create a new user for the database

Once you click Go Back, you can fill the form Add User To Database. Select the user from the drop-down list, and choose the database to which the user would be assigned.

adding new user to the database

Once you click Add, you’ll be directed to the Manage User Privileges window.

Step 4. Provide Privileges to the New User

In this step, all you have to do is to grant privileges to the user. If you’re creating an admin, you can check ALL PRIVILEGES and click the Make Changes button.

grant privileges to the new user

There you have it, you have successfully created a database, user and granted privileges that are required to access the website’s database. Keep in mind, we only created an empty database with this tutorial, so you need to manually create or import all the tables and entries to it.

 


Was this answer helpful?

« Back