Mac OS X - Reset MySQL Root Password

Mac OS X - Reset MySQL Root Password

Last updated on Jul 23, 2015 by edgar in category MySQL

Have you forgotten your Mac OS X 'ROOT' password  and need to reset it?  Follow these 4 simple steps:

1.  Stop the mysqld server.  Typically this can be done by from 'System Prefrences' > MySQL > 'Stop MySQL Server'

2.  Start the server in safe mode with privilege bypass

     From a terminal:

     sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables

3.  In a new terminal window:

     sudo /usr/local/mysql/bin/mysql -u root

     UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root';

     FLUSH PRIVILEGES;

     \q

4.  Stop the mysqld server again and restart it in normal mode.

Variphy UC Tools & Analytics is trusted and used by thousands of organizations & Cisco Unified Communications/Collaboration engineers
Providing leading edge UC Management Tools to over 1200 organizations worldwide