Tag: reset root password

  • Reset MySQL root Password

    To reset MySQL root password, stop MySQL

    service mysql stop
    

    Start MySQL with

    mysqld_safe --skip-grant-tables
    

    Start another terminal, login to MySQL as root

    mysql -u root
    

    Run following commands to change password.

    update mysql.user set password=PASSWORD("PASSWORD_HERE") where User='root';
    flush privileges;
    quit
    

    Now you need to kill running MySQL processes and start MySQL as normal.

    killall mysqld_safe
    killall mysqld

    Restart MySQL

    service mysql start

    See MySQL Password Reset/Change