Sep 27, 2018

How to Reset MySQL Root Password

$ cat /var/log/mysqld.log | grep -i "password"
mysql> alter user 'root'@'localhost' identified by '[email protected]?';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)