How to reset forgotten MySQL root password on CentOS Jun 11, 2014 by Marcelo Jacobus This are the steps: # service mysqld stop # mysqld_safe --skip-grant-tables & # mysql --user=root mysql MYSQL> update user set Password=PASSWORD('new-password') where user='root'; MYSQL> flush privileges; MYSQL> exit; # service mysqld restart This is the source.