This written lecture is related to the upcoming 'Installation: Mac Instructions' video lecture. Be sure to proceed to watch that lecture video if you are using a Mac computer, but while doing that, keep these lecture notes handy.


NOTE #2: If your MySQL Workbench application is unexpectedly crashing

If the MySQL Workbench app is unexpectedly quitting on a Mac computer, installing a slightly older version of MySQL Workbench 8.0.* could help with this issue check the Teaching Assistant's first highlighted answer in this Q&A thread for details about it.

NOTE #1: If you are getting the mysql command not found error in the macOS zsh terminal after downloading and installing MySQL

Newer versions of macOS are now using the zsh terminal instead of the bash terminal by default. You can use this command to check which terminal your macOS is running: 

echo $SHELL

* If you see bash in the output of that command, you can immediately skip to the 'ORIGINAL LECTURE NOTE: Mac Installation Commands' section below.

But, if you see zsh in the output of that command, then editing the ~/.bash_profile file, like seen in the instructions, won't work instead, you need to edit your ~/.zshrc file while following the Mac installation instructions. Or, instead of manually opening and editing the mentioned terminal configuration file, you can just run this as a single terminal command and it should add the necessary configuration to the ~/.zshrc file to make the mysql command work in your zsh terminal:

echo "export PATH=${PATH}:/usr/local/mysql/bin" >> ~/.zshrc

After that, completely exit your terminal app, then start a brand new terminal window, and try the mysql command again!


ORIGINAL LECTURE NOTE: Mac Installation Commands

After you have downloaded and installed MySQL on your Mac, you'll likely need to run the following commands to be able to execute the mysql program from the command line.

NOTE: Instead of manually opening and editing the mentioned ~/.bash_profile terminal configuration file in the upcoming instructions, you can just run this as a single terminal command and it should add the necessary configuration to the ~/.bash_profile file to make the mysql command work in your bash terminal:

echo "export PATH=${PATH}:/usr/local/mysql/bin" >> ~/.bash_profile

After that, completely exit your terminal app, then start a brand new terminal window, and try the mysql command again!


  1. Open up a new window in Terminal

  2. Run this command: open ~/.bash_profile

  3. If the previous step gave you an error, run this first touch ~/.bash_profile

  4. You should see a file called .bash_profile open up in a text editor.  Inside that file, paste the following line at the bottom: export PATH=${PATH}:/usr/local/mysql/bin

  5. Save the file and close it

  6. Open up a NEW TERMINAL WINDOW (or run this command: source ~/.bash_profile in the existing terminal window) and you should now be able to run mysql -u root -p

  7. Enter your root password when prompted

If you have questions or issues with any of this, please reach out in the course Q&A boards so we can help out further!