Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed wamp in my windows 7 machine. While setting the root password in mysql , I got following error :

C:\wamp\bin\mysql\mysql5.1.36\bin>mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I am installing mysql first time , so I have not set the password before. I tried to solve the problem using the link. I know this link is for linux but I followed the first step and tried to stop mysql. It showed following error :

C:\wamp\bin\mysql\mysql5.1.36\bin>mysql stop
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

As you can see, it is not allowing me to use any command. I am running the cmd as admin. Can anybody help me to solve this problem please. Thanks in advance.

share|improve this question
    
Can you use the phpmyadmin that is included with wamp? –  Kenny Rasschaert Nov 20 '10 at 21:27
add comment

2 Answers

up vote 0 down vote accepted

WAMPserver installs MySQL with a root user without a password.
Just type mysql -u root -p and hit enter when asked for password.
Then you can set a new password by typing mysqladmin -u root password NEWPASSWORD.

share|improve this answer
    
Thanks problem solved –  user58859 Nov 21 '10 at 9:16
add comment

Start phpMyAdmin from the wampserver icon

Click on Privileges

You should then see a User Overview page

Click on the Edit Privileges icon to the right of the user you want edit.

You should get a page with a page with a Change Password panel

Enter a password and Re-type then click Go.

you should then be able to use

mysql -u root -p password
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.