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.
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
.Start
phpMyAdmin
from the wampserver iconClick on
Privileges
You should then see a
User Overview
pageClick 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
panelEnter a password and Re-type then click Go.
you should then be able to use