Lost MySQL root Password

Damn, I just wanted to access the MySQL database here at home but hmpf, do you think I remembered the root password when I installed it? No, but:

How to reset the lost root Password for MySQL:

  • /etc/init.d/mysql stop
  • /usr/bin/mysqld_safe –skip-grant-tables &
  • mysql -h localhost
  • use mysql;
  • update user set password=password(‚…….‘) where user=’root‘ and host=’localhost‘;
  • quit;
  • /etc/init.d/mysql start

Have fun ;-)