Sunday, December 27, 2009

MySql Password Recovery

$ /etc/init.d/mysql stop
$ mysqld_safe --skip-grant-tables &
$ mysql -u root
> UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root';
> FLUSH PRIVILEGES;