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

























BlogoSquare
4 Comments so far (Add 1 more)
2 Trackbacks
[...] To install WAMP check this post. Click Here [...]
[...] 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 [...]