Skip navigation links

MySQL Forums :: Install & Repo :: Reset MySQL root password


Advanced Search

Reset MySQL root password
Posted by: jeff shu ()
Date: April 01, 2012 03:58PM

Hello everyone:

I am trying to reset the root password for MySQL. Here are the version and install information. My OS is windows 7
Apache version 2.2.21
PHP version 5.3.10
mysql-essential-5.1.61-win32.msi

I installed Mysql in C folder. I didn't vreat a 'mysql' folder to hold all sub-sequent files. 'bin' folder and my.ini file are stand alone in C:\


I did some search online and tried different options to reset root password. it did not for me.

I followed stpes from: http://dev.mysql.com/doc/refman/5.5/en/resetting-permissions.html to reset my password

Here are the script I used
first try: UPDATE mysql.user SET Password=PASSWORD('newpd') WHERE User='root';
FLUSH PRIVILEGES;

second try:
set password for root@localhost=PASSWORD('newpd');
set password for root@127.0.0.1=PASSWORD('newpd');
flush privileges;

I used cmd command mode to run the script. Here is the message I got
from command prompt
C:\>mysql -u password -p
Enter password: *********
ERROR 1045 (28000): Access denied for user
'password'@'localhost' (using password: YES)

Please give me some suggestions to resolve this issue. Thanks!



Edited 1 time(s). Last edit at 04/01/2012 03:59PM by jeff shu.

Options: ReplyQuote


Subject Written By Posted
Reset MySQL root password jeff shu 04/01/2012 03:58PM
Re: Reset MySQL root password Barry Galbraith 04/01/2012 05:19PM
Re: Reset MySQL root password jeff shu 04/01/2012 09:46PM
Re: Reset MySQL root password Barry Galbraith 04/01/2012 09:59PM
Re: Reset MySQL root password jeff shu 05/25/2012 01:14PM
Re: Reset MySQL root password Barry Galbraith 05/25/2012 07:39PM
Re: Reset MySQL root password jeff shu 05/27/2012 05:01AM
Re: Reset MySQL root password John Foy 05/31/2012 11:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.