How to Create a MySQL Database and Assign Privileges to a User with cPanel

This post explains how you can use cPanel to create a MySQL database, database user and then assign all privileges for the database to that user with cPanel. It may sounds little advanced, but it’s not. I have also included a video tutorial to make it even easier for you.

You can always get this done with phpMyAdmin as well, but I prefer using cPanel to do it as it’s the easiest and fastest way to do it. This method is to create a new database, new user and give database permissions to new user. This will not work if either database or user already exits.

I’m using HostGator’s cPanel for this tutorial, but it’ll work for any other host if they offer cPanel. Here’s the Video tutorial.

[youtube id=”jV_wZlCv_sc” width=”520″ height=”302″]

Here’s the text version of it if someone would like to follow or if you have issues with video.

First login to your cPanel, you can find your login info and cPanel url in the welcome email sent to you by your hosting company. After you logging in, scroll down and look for ‘MySQL Database Wizard’ link under databases section. Click it and you’ll be redirected to MySQL Database Wizard page where you have to complete three steps. Those steps as follows,

  • Step 01: Create a Database

Give your database a name. Type it in the text area. Click next

  • Step 02: Create Database Users

Create a database user. Give it a name and pick a password. Then again click next.

  • Step 03: Add User to the Database

The user you created needs permissions to communicate with the database. You can configure it here. Simply tick ‘ALL PRIVILEGES’ and click next.

And that’s it. A database and a user with necessary permissions are now created. Last step will display database name and username you just created. You can use those information to install whatever script or software you want to install.

Tharindu

Hey!! I'm Tharindu. I'm from Sri Lanka. I'm a part time freelancer and this is my blog where I write about everything I think might be useful to readers. If you read a tutorial here and want to hire me, contact me here.

Related Articles

6 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button