MySQL Forums
Forum List  »  Install & Repo

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

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: to reset my password

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

second try:
set password for root@localhost=PASSWORD('newpd');
set password for root@'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

Written By
Reset MySQL root password
April 01, 2012 03:58PM
April 01, 2012 09:46PM

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.