[Mac] Reset MySQL Root Password

Reset your MySQL ‘ROOT’ password —

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 authentication_string = PASSWORD(‘MyNewPass’), password_expired = ‘N’ WHERE User = ‘root’ AND Host = ‘localhost’;

FLUSH PRIVILEGES;

\q

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


So, what do you think ?

%d bloggers like this: