How Do I Create a MySQL Database & User in cPanel? cPanel 

  • Thread starter Cameron
  • Start date
Cameron

Cameron

New Member
Joined
May 10, 2021
Messages
10
Points
1
  • #1
I'm installing a WordPress blog and the installation instructions are telling me to create a MySQL database and user for the site. The user should have all privileges as well. Is this difficult to do? I am not comfortable using the black screen with the blinking cursor, so I'd rather do this in cPanel. I have access to my cPanel account, but I need clear instructions for how to create the database and user. Can anyone help?
 
EmeraldHike

EmeraldHike

New Member
Joined
May 10, 2021
Messages
10
Points
1
  • #2
I can help you. I've created hundreds of databases and users in cPanel in my day. It's an easy and painless process.

Creating a MySQL Database in cPanel​


To start off, log into your cPanel account. Then, find the Databases section and click on the MySQL Databases link.

cpanel-databases-section.gif

On the next page, you'll see some fields to fill in. Find the one that's located directly under the Create New Database heading. Sometimes there will be a prefix already set for you, but sometimes there won't be. Place the name of your database in the field and then click the Create Database button below the field.

cpanel-create-new-database.gif

Once you complete this, the database will have been created and you should see it listed under the Current Databases heading.

Creating a MySQL Database User in cPanel​

Next, you'll need to create a user to go along with this database. Below the field you filled in earlier, you should see one that has two headings. The first is MySQL Users and the second is Add New User. Again, there may already be a prefix that's been filled in. This depends on what type of hosting account you have and with which company. If there isn't a prefix, don't worry about it.

Go ahead and fill in a username and password for this user and then click the Create User button.

cpanel-create-new-mysql-database-user.gif

When you do that, a second page will appear. This next page is where you set the database user privileges. I always check all the boxes because I don't want to have to concern myself with privileges down the road. I advise you to do this too.

cpanel-mysql-database-manage-user-privileges.gif

When finished here, click the blue button at the bottom. As you can see, I'm using my own account and database as an example here, so I'm removing some information in Photoshop. The blue button on the bottom may appear to be different for you than it does in the above graphic.

When finished, you may be presented with a "Back" link. click that to return to the MySQL database homepage.

Adding a User to aMySQL Database in cPanel​

At this point, you have both a new database and a new user set up. The final step in the process is to add the user to the database, so when WordPress accesses both, it knows they belong together.

At the bottom of the page, you should see a section with the heading of Add User to Database.

cpanel-add-user-to-mysql-database.gif

Select the user from the top drop-down and the database from the bottom. Then click the Add button and the user and database should be associated with one another.

That's it! Once this is complete, add this information to the WordPress config file and continue on with the installation. If you need anymore help, please don't hesitate to ask.
 
Last edited:
How Do I Create a MySQL Database & User in cPanel? was posted on 05-17-2021 by Cameron in the Servers & Hosting forum.

Similar threads

Search

Looking for an all-around awesome forum? Check out IndyFor!
Top