OSX How to Reset forgotten mysql root password


  1. we need to stop the mysql server
  2. sudo /usr/local/mysql/bin/mysqld_safe –skip-grant-tables
  3. from a different bash tab /usr/local/mysql/bin/mysql mysql
  4. Once we login in mysql we have to type ‘UPDATE user SET Password=PASSWORD(‘yourpass’) WHERE Host=’localhost’ AND User=’root’;’
Advertisements

One thought on “OSX How to Reset forgotten mysql root password

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s