Skip to content

Instantly share code, notes, and snippets.

@vochicong
Created August 10, 2017 00:18
Show Gist options
  • Save vochicong/d95086a1cb31d7277aefb5fc728d3224 to your computer and use it in GitHub Desktop.
Save vochicong/d95086a1cb31d7277aefb5fc728d3224 to your computer and use it in GitHub Desktop.
MySQL

Reset MySQL root password on Mac

On Terminal 1

mysql.server stop
mysqld_safe --skip-grant-tables

On Terminal 2

mysql -u root

Inside MySQL prompt

FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NEWPASSWORD';
\q

Back to shell prompt

mysql.server restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment