If you're new here, you may want to subscribe to my RSS feed. So that you can read the latest updates about Web2.0 tools, Making Money Online, Tips in SEO, Ajax and many more. Thanks for visiting ProgramimiCOM!

MySQL is a popular SQL database platform. It’s commonly installed on servers and is a core PHP extension.

Software such as Invision Power Board, phpBB, vBulletin, and WordPress require MySQL (with support for other database platforms) in order to function. For the novice user, setting up the database and then entering that information in a config file may be a little confusing. I’m going to be using cPanel to set up the database, other control panel software may be different.

First we have to log into cPanel, then click the MySQL icon.

mysql-icon.png

Now, you will see a page with any MySQL databases you already have, then 4 forms, only 3 of which we’re going to worry about. First, we need to create our database, this is the field right under the ‘Add User to DB’ button. If we’re installing WordPress, we might want a database named wordpress, we’ll enter that in the box and press OK.

db-create.png

Now that we have our database, we need to create a user. This form is right below the add database one. The username we enter will be prefixed with your_cP_username_dbusername. Also, the length of usernames are limited, so although I’m entering wordpress, it will only be wordpres. This means my username would be mck9235_wordpres. Enter a password you will remember. Look at the image if you’re still confused.

db-user.png

Last, we need to add our user to the database and give it the proper permissions. This is the first form. All you need to do is find your user and database from the dropdowns and then click add.

db-user-add.png

Now, when you go to the main MySQL page, you will see something like:

db-final.png

At last we have our database set up, but we still need to be able to enter the details. A sample config file might look like this:

<?php
$host = ‘localhost’;
$user = ;
$db = ;
$pass = ;
?>

Now, the host will be localhost 99% of the time, so you don’t need to mess with that. We know our username is mck9235_wordpres, db is mck9235_wordpress, and the password is whatever you said. All you need to do is fill those values in, then you’re ready to go!