mysqld_safe --skip-grant-tables
mysql --user=root mysql
update user set Password=PASSWORD('new-password') where user='root'; flush privileges; exit;