headermask image

header image

Installing WAMP on your Windows system

WAMP (now known as WampServer) is like a AIO package that allows you to setup a web server on your local machine to simulate any project that you may run on a remote server.

WampServer 2.0 includes:

  • Apache 2.2.6
  • MySQL 5.0.45
  • PHP 5.2.5

Download it from here.

Installation is a piece of cake. There are no complexities involved. At one point it will ask for the SMTP server address and the e-mail address needed for the PHP mail() function. Do what you choose to do with them, or leave them at their default values. You can anyways change it later.

After installation is complete, choose Firefox( Internet Explorer FTL!) as the browser to be used with WampServer and then start the WampServer service. Windows Firewall will give a warning about blocking the apache HTTP server. You won’t be blocking it, otherwise you wouldn’t have been reading this dumb tutorial, so Unblock it.

Once the WampServer is started, check if all is correct by pointing to http://localhost in your browser. You’ll see lot of information about the version of apache and mysql installed. You’d be seeing something called phpMyAdmin. Actually it is a tool developed in PHP that allows the remote administration of MySQL databases through a browser. Click on it or visit http://localhost/phpmyadmin .

Now you would like to create a new user.

*NOTE* I found creating a new user a pain with phpMyAdmin (or maybe I have a personal grudge against the GUI). There are a lot of fields you will grow tired of clicking on or even better, become confused. I’ll explain it the command line way. Navigate to D:\wamp\bin\mysql\mysql5.0.45\bin> assuming you have installed WAMP at D:\wamp. Now type in the command:

mysql -u root

You would be logged in as the root and you’d be at the mysql> prompt now. The very first thing you should do is specify a password for the root with the command:

SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’yourpassword’);

Remember to end every command with a ‘;’ (semicolon if you didn’t know). Now create a new user with the following command:
CREATE USER user [IDENTIFIED BY [PASSWORD] ‘password’]

One thing to be kept in mind is that the [] brackets signify optional parameters, like you could skip the whole IDENTIFIED BY field to create an user account without password.

Now, you can specify the username as anomit or anomit@localhost, the former would allow ‘anomit’ to login from ay computer but the latter would allow ‘anomit’ to login from ‘localhost’ only. So the former isn’t exactly recommended from the viewpoint of security.

Here is an example:
CREATE USER anomit@localhost IDENTIFIED BY 'passwd' ;

What i am going to do is create a user account that can only SELECT, INSERT, UPDATE and DELETE for each database. Since you already have a root account, you don’t need another with the same escalated privileges. Anyways, its your wish to what you want.

So, I grant the privileges by:

GRANT SELECT,INSERT,DELETE,UPDATE ON *.* TO anomit@localhost IDENTIFIED BY 'passwd';

Now, for logging into a password enabled user account, you should use the command:

mysql -u username -p

There you are done with a new user account. Use ‘help contents’ at the mysql prompt to know more about the commands. Have fun!

If you liked my post, feel free to subscribe to my rss feeds

4 Comments so far (Add 1 more)

  1. Yeah! WAMP have released a new version. Earlier they were running on versions 1.6.x and 1.7.x and directly switched to 2.0
    This new 2.0 version is really very nice. You can switch among various versions of Apache,PHP. The various versions are on the site as Swaroop said.
    Thanks for the info Swaroop :)

    2. Manish on December 16th, 2007 at 11:55 am
  2. And anyone interested in having multiple version of Apache & PHP (even MySQL), you can get the required addons from the main website and switch version. Again, another one click install.


    Swap

    3. Swaroop Hegde on December 16th, 2007 at 10:55 am
  3. oh sorry, should have mentioned that….place any php projects you have under the www folder

    5. anomit on November 30th, 2007 at 8:26 am
  4. And for those who want to use wordpress or MediaWiki, just extract either of the two under www directory under wamp directory. Now point your browser to http://localhost/. Under Projects Section, that folder will appear. Now just click on that name and the setup will start.

    I usually have hard time telling people how to install WAMP and run php softwares under it.

    6. Manish Sinha on November 30th, 2007 at 3:06 am

2 Trackbacks

  1. [...] To install WAMP check this post. Click Here [...]

  2. By Manish’s Blog » Blog Archive » Who saved me? on December 1, 2007 at 4:02 pm

    [...] reporting from LUG-Manipal. Things are going on quite well, Anomit wrote a post “Installing WAMP on your Windows“. This was very important since most of the newcomers in this field dont know how to run [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*