nirjari patel wrote:I was never asked to setup username or password, then why am I getting such an error ?
The wamp installer probably ste a default password. You should look at the docs for your wamp server to find out what it set. (I always install the pieces separately, and the MySQL installer always asks for the root password to set.)
Secondly, when I have to use a database with php, it asks for database user and database password.
You alsways need to provide this information so that the database knows you have access. By the way, when MySQL gets installed, what you really get is a database server (yes, there are 2 databases created for that server, but you shouldn't use those). Before you use the database, you have to create one. The steps are usually:
1) Create the database
2) Create a user and assign rights to that database
This page should help, scroll down to the "Create a database using MySQL Commands" section:
http://drupal.org/documentation/install/create-database
I already had MySql installed on my computer. So how does this affect new installation of MySql with wamp ?
That all depends on how the wamp installer works. It could have used the existing MySQL, or it could have installed another one and set it to use a different port. In the latter case you will have both MySQLs running. Check Task Manager, and also look at the list of services in control panel.
By the way, it would help if you gave us the link to the wamp server that you downloaded and installed. There are several, and not knowing which one you used makes it difficult to help you.