- Stop MySQL:
sudo /usr/local/mysql/support-files/mysql.server stop
- Next Step would be to start it in safe mode:
sudo mysqld_safe --skip-grant-tables
- Execute the following commands in order
mysql -u rootFLUSH PRIVILEGES;ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';. Please ensure you change MyNewPass to what ever you want.- Now exit mysql prompt
- Start MySQL