Resetting ROOT password in MySQL 5.6

前端 未结 9 1901
名媛妹妹
名媛妹妹 2020-11-27 17:24

I have been following these instructions for resetting root password for local installation of MySQL 5.6 on Windows 7 laptop.

I stopped

相关标签:
9条回答
  • 2020-11-27 17:53

    For MySQL 5.6 on Windows I had to run this statement to make it work.

    UPDATE mysql.user
    SET Password=PASSWORD('NEW PASSWORD'), 
    authentication_String=PASSWORD('NEW PASSWORD')
    WHERE User='root';
    
    0 讨论(0)
  • 2020-11-27 17:54

    First stop mysql server and follow below steps:

    Go to mysql bin directory on cmd i,e. cd C:\ProgramData\MySQL\MySQL Server 5.6\bin (Its a hidden directory)

    skip grant tables will allow you enter into mysql

    • mysqld.exe --skip-grant-tables

    Open new command prompt or on same command prompt

    • mysql.exe -uroot -p (without any password you can login to mysql)

    run below query to change mysql root password

    • UPDATE mysql.user set password=password('root password') WHERE user='root';
    • flush privileges

    Thats it, Restart mysql and good to go with new password..!!

    0 讨论(0)
  • 2020-11-27 17:58

    The issue has been resolved.

    As stated in my question I followed instructions from MySQL manual.

    The process did not go exactly as described (and this was the reason for my original post) but it worked nevertheless (see UPDATE section in my post).

    0 讨论(0)
提交回复
热议问题