MySQL root password change

前端 未结 22 2859
被撕碎了的回忆
被撕碎了的回忆 2020-11-29 18:30

I have been trying to reset my MySQL root password. I have run the mysqld_safe --skip-grant-tables, updated the root password, and checked the user table to make sure it is

22条回答
  •  误落风尘
    2020-11-29 18:37

    stop all wamp services , exit from wamp.

    open notepad then type> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');

    then save it to c: drive with any name .. like this "c:/example.txt"

    now goto your "wamp" falder wamp > bin > mysql > mysql(your version) > bin in my case path is "C:\wamp\bin\mysql\mysql5.6.17\bin"

    now copy your path then run cmd with (ctrl + r) then type "cmd" (enter)

    type cd then right click on cmd and paste path (enter) now type (mysqld --init-file=C:\example.txt) without braces then (enter)

    then restart PC or open taskmgr and kill mysqld.exe

    start wamp and your password will be removed...

提交回复
热议问题