1. start mysqld and restart it with the --skip-grant-tables option.
$ mysql mysql> UPDATE mysql.user SET Password=PASSWORD ('MyNewPass') WHERE User='root'; mysql> FLUSH PRIVILEGES;
* The FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change.
$ sudo service mysql restart
[may need restarting the pc]
$ mysql -u root -p [asks for password]
References
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-unix
No comments:
Post a Comment