about 6 years ago
  1. Download from .DMG file from the official MySQL site

  2. 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

  3. Once installed, open System Preferences

  4. Find MySQL and click on Start MySQL Server

  5. open Terminal, and enter mysql see if it gives you an error, if it did, enter the following:

ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
  1. In Terminal, type mysql -u root -p, press enter, then enter the default password you wrote down in step #2

  2. Once 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;
  1. still in the mysql command prompt, create a database so that you can play with:
create database_name;
use database_name;


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:

← Pandas selecting rows and columns 优化Shadowsocks速度 →
comments powered by Disqus