Download from .DMG file from the official MySQL site
Doulbe click the .DMG file and follow the install instruction, at the end of the installation, take note of the pop up window that shows your root password
Once installed, open
System Preferences
Find
MySQL
and click onStart MySQL Server
open
Terminal
, and entermysql
see if it gives you an error, if it did, enter the following:
ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
In
Terminal
, typemysql -u root -p
, press enter, then enter the default password you wrote down in step #2Once you are in the mysql command prompt, enter the following to change your default password for the root account and prevent it from expiring:
ALTER USER `root`@`localhost` IDENTIFIED BY 'new_password', `root`@`localhost` PASSWORD EXPIRE NEVER;
- still in the mysql command prompt, create a database so that you can play with:
create database_name;
use database_name;
9.Done!
P.S. If you prefer to use a GUI to interact with MySQL on MacOS, download Sequel Pro (it is FREE)
Thanks to the following SO posts:
https://stackoverflow.com/a/42112541/1478290
https://stackoverflow.com/a/44475051/1478290
https://stackoverflow.com/a/34115471/1478290