How to reset mysql root password

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

service mysql start

Leave a Reply

Your email address will not be published. Required fields are marked *