Reset MySQL root password on Mac

Simple and clear way to update the root password MySQL on Mac:


1) sudo /usr/local/mysql/support-files/mysql.server stop
2) sudo /usr/local/mysql/support-files/mysql.server start --skip-grant-tables
3) cd to /usr/local/mysql/support-files/mysql
4) ./mysql> FLUSH PRIVILEGES;
5) mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
6) Ctrl + z
7) sudo /usr/local/mysql/support-files/mysql.server start
8) /usr/local/mysql/support-files/mysql -u root -p
9) enter the new password i.e MyNewPass

Reset MySQL root password on Mac

Leave a Reply

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