forgotten the MySQL root password

kosandpol

Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    machan meeka mysqld.exe -u root --skip-grant-tables kalaaama mehema enawane


    36079629.jpg
    who told to use -u root with that command ?
    post the contents of a mysql server\bin folder and I'll give you the exact commands to use.
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    try the following from E:\program files\mysql\mysql server 5.1\bin folder using cmd

    net stop MySQL <-- this is to stop the mysql service

    mysqld --skip-grant-tables

    now keep that cmd window open and start a new cmd window and go to E:\program files\mysql\mysql server 5.1\bin in that and run :

    mysql -u root

    this will give you the mysql prompt :

    mysql>

    in the mysql prompt execute :

    mysql> use mysql;
    mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root'; <---
    replace NEW-ROOT_PASSWORD with your password
    mysql> flush privileges;
    mysql> quit


    now close the first cmd window as well and restart the mysql service from the service tab.
     

    Jack_Sparrow

    Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    try the following from E:\program files\mysql\mysql server 5.1\bin folder using cmd

    net stop MySQL <-- this is to stop the mysql service

    mysqld --skip-grant-tables

    now keep that cmd window open and start a new cmd window and go to E:\program files\mysql\mysql server 5.1\bin in that and run :

    mysql -u root

    this will give you the mysql prompt :

    mysql>

    in the mysql prompt execute :

    mysql> use mysql;
    mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root'; <---
    replace NEW-ROOT_PASSWORD with your password
    mysql> flush privileges;
    mysql> quit


    now close the first cmd window as well and restart the mysql service from the service tab.


    wede hari lesatama :D machan thanks a lot machan

    :D