13 September 2016

How to reset mysql root password

In case you forgot your mysql root password, it's good to know a way to reset it. in
/etc/mysql/my.cnf 
add in [mysql] section
skip-grant-tables

restart mysql service login without password and update current password by doing
UPDATE mysql.user set password = PASSWORD('your_new_password') where user = 'root' and host = 'localhost';

Keine Kommentare: