A Quick Tutorial – Resetting MySQL Root Password on Mac OS

Resetting MySQL Root Password on Mac OS tutorial.

Use case: You’re logging into your MySQL Workbench app on your Mac OS and on the first startup. Workbench requires a Root Password.

If you’ve misplaced it, there’s a quick process to dig through. Let’s start with the easy method – did you save it somewhere?

Click the magnifying glass on the top right and search for it, if you built notes for your password.

forgot root password on mysql mac
If you took notes of your Root Password – try searching for it first.

Here’s the text for the temporary password that you can search on your mac.

[Note] A temporary password is generated for root@localhost: rt4rvI,%lfr<

Maybe you forgot your Mac OS X ‘ROOT’ password? Or potentially didn’t save the Temporary password in your notes?

If you did save your root password, it’s likely you saved it in a similar fashion to us.

How to Reset MySQL root password on your Mac

Here’s a quick how to reset mysql root password on your mac tech tutorial!

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 mysql server again and restart it in normal mode.

We found these steps @ https://www.variphy.com/kb/mac-os-x-reset-mysql-root-password

Resetting MySQL Root Password on Mac OS – To build SQL on CSV environments.

If you’re a heavy Tableau desktop user – it’s smart to have MySQL installed on your Mac OS.

If you install MySQL on your Mac – you can utilize MySQL Workbench and it will increase your solution capability in a CSV environment.

  1. Install MySQL on Mac
  2. Download MySQL Workbench
  3. Log in to your MySQL instance with Workbench
  4. Input your root password.

Why do we need MySQL updated right now?