- System Preferences > MySQL > Stop MySQL Server
- From a terminal:
sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
- From a new terminal:
sudo /usr/local/mysql/bin/mysql -u root
- From mysql>
FLUSH PRIVILEGES;
- From mysql>
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NEWPASSOWORD';
- From mysql>
\q
- Stop server
- Start server
- Test connection with new password:
mysql -u root -p
- Type new password
- Bingo!
- and 7.
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server start