Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

lost your mysql root password?

Discussion in 'Programming' started by dman_2007, Apr 1, 2008.

  1. dman_2007

    dman_2007 Guest

    If you ever forgot the password of the root user of mysql install, then don't worry. You can easily reset it to something else (though you won't be able to revover the old password). Here's how you can do it :

    1) Shut down the mysql server process
    2) Restart the server process with these two additional options : --skip-grant-tables and --skip-networking
    3) first option will bypass the loading of grant tables, hence anyone will be able to access any database without any need to provide any password. Second option, will turn off networking feature. This will ensure that only those who have access to the system will be able connect to the server.
    4) Connect to the server and use UPDATE SQL command to update root password by updating password field in user table in mysql database.
    5) log out of the server and then restart it without those two options and you'll be able to log in as root user by using the new password.
    2 people like this.
  2. Resonate

    Resonate <span style="color: white; font-weight: 700; backg Webmaster

    Excellent dman, this will be useful for a lot of new sql users, i remember the first time i did this & it was hard to find a simple resource to tell me how to regain access
  3. gkd_uk

    gkd_uk Moderator Moderator Webmaster

    Great post - rep added
  4. dman_2007

    dman_2007 Guest

    Thank you for your kind comments and the rep.
  5. NYK007

    NYK007 New Member Webmaster

    Hi friends

    Hello everyone! I am Joseph from London Newly visited this site.
    Thanks for the solution.

    Job Search

Featured Resources (View All)

Share This Page