This is a mirror of official site: http://jasper-net.blogspot.com/

Mysql – Resetting root password

| Sunday, October 30, 2011
Once in a while you want to reset your mysql root password, here is how you can do it.

Stop the MySql service

    sudo /etc/init.d/mysql stop

Restart MySql in safe mode and skip grant table so that you can login with root without any password.

    sudo mysqld_safe --skip-grant-tables &

Login with root

    mysql -u root

Connect to MySql database

    use mysql;

Reset the password to a new password

    update user set password=PASSWORD("password") where User='root';

Read more: Hussain Anjarwala
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://hussainanjar.com/2011/10/mysql-resetting-root-password/

Posted via email from Jasper-net

0 comments: