- Make sure mysql service stopped
mysql.server stoporbrew services stop mysql - Create a text file somewhere ex.
/Users/iambudi/reset_pass.txtand write this one liner sql to the file:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'ReplaceNewPassHere';- Run mysql service
mysqld --init-file=/Users/iambudi/reset_pass.txt - Connect to mysql using the new password
When things goes okay, delete the reset_pass.txt, stop and start mysql again.