First things first. Log in as root and stop the mysql dae­mon. Now lets start up the mysql dae­mon and skip the grant tables which store the pass­words. mysqld_safe --skip-grant-tables mysql --user=root mysql update user set Password=PASSWORD('new-password') where user='root'; flush privileges; exit