Tuesday, March 20, 2007

Free Tutorial - Build a website v1.0 part 1 - Installing APACHE server and MYSQL database

This tutorial will show you how to create a simple but professional website. It will take you to the coding and designing basics for a site creation.

PHP - scripting language used
Mysql - Database

In order to work with PHP and MYSQL you will need a server and the mysql database running..
To help you install these things quick and easy... go here:

You will download Xampp. A application that automatically installs Apache Server and Mysql Database to your computer.

The installation is very easy....just the next>next>next finish procedure :)...

I'm not going to go much in this...if you would like to study this system......for further information go to:

When it asks if you want to install Apache server and mysql database, please confirm.

NOW, THE MOST IMPORTANT THING you must do after you've just installed APACHE and MYSQL is to take care of the security issues.

Right now, you are EXPOSED to a lot of hackers....
just type http://localhost/ in your browser...you will see that your browser is working.....
but....also...your database. So, if you type http://localhost/phpmyadmin/ in your browser's address bar, you will see that your database is up and running. Just 1 problem: It's up and running for EVERYONE. So, everyone has access to your database right now.... and...I think you won't want that.

So what do we do?
Follow these steps exactly and you will be protected against hacker attacks:

1. go to http://localhost/phpmyadmin/ and click Privileges

2. Select the edit on Root like in the picture:
3. Go to change password and select the Password radio button like in step 1 in the picture, then type and re-type your password like in step 2 and finally click GO.
Right now, if you try to reload your http://localhost/phpmyadmin/ you will see that it does not work..because you do not have the privileges....it gives an error.

now...the hard but necessary part starts.
4. find the config.inc.php file.
config.inc.php is located in your Xampp directory , inside the phpmyadmin directory
Xampp by default is usualy installed in your Program Files Directory
path where you installed xampp\xampp\phpMyAdmin\config.inc.php

Edit the file with Wordpad or any other richtext editor (not with notepad!!!)

5.edit the file config.inc.php and search for the lines:

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed

and make these modifications:

$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'The_password'; // MySQL password (only needed

- The HTTP (in $cfg['Servers'][$i]['auth_type']) means that anyone who tries to access your phpmyadmin will be getting a user/password verification window where they must know the user:root and your password

- the password (in $cfg['Servers'][$i]['password']) means that you are setting your password information with the new password that you just created.
You will be prompted for the user and password each time you try to enter PHPmyadmin.

Right now you are pretty much secured from any hacker that's trying to ruin your database and hack into your system....

If you
Want to test your server, you can create php or html files....and add them in the HTDOCS directory from xammp directory.
The HTDOCS directory is the path where you will add your files for the site.
That's IT for now.... next part will be: Adding a database and table into MYSQL

Continue tutorial >

1 comment:

Anonymous said...

yea but how do i connect to my database from anther computer if i dont have a static ip? (maybe dyndns.com but how does all this work? )