Quantcast
Viewing latest article 7
Browse Latest Browse All 10

How to install MySQL on MacOS

  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;

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


Viewing latest article 7
Browse Latest Browse All 10

Trending Articles