3

I have spent many hours reading and trying dozens of variations of ways to reset the root password, but I am not getting anywhere. The most complete set of instructions I found (and tried) were the following. BTW, I am running MySQL 5.5 on Win7, 32 bit.

  1. I created a file, c:\mysqlinit.txt, containing the two lines: UPDATE mysql.user SET Password=PASSWORD('myroot') WHERE User='root'; flush privileges;
  2. Stopped the MySQL55 Service from Control Panel, Admin Tools, Services
  3. Opened a Command prompt window (running as the admin)
  4. Navigated to \Program Files\MySQL\MySQL Server 5.5\bin\
  5. Executed the command start mysqld --init-file=C:\mysqlinit.txt

Everything seemed to work fine (no errors). At the completion of this procedure, I thought I could log on with the root user name and the above password, but when I executed the command

mysql -u root

I received the error message,

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I am probably doing something wrong, but can't spot it and it is driving me nuts.

1 Answers1

0

A can reset password in windows with this steps:

1) Stop running Mysql service first (Administrative tools > Services )

2) "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" -u root --skip-grant-tables

3) uninstall mysql server

4) install mysql server and set in installation:

root current password - it's must be blank
new password - set your new passowrd
confirmation new password - set your new passowrd

also there I added new admin user konst

shilovk
  • 11,718
  • 17
  • 75
  • 74