Skip to content

Instantly share code, notes, and snippets.

@jnoss
Created June 24, 2017 19:39
Show Gist options
  • Save jnoss/9444cdbb96e472c8b6b50e86d8e58ca5 to your computer and use it in GitHub Desktop.
Save jnoss/9444cdbb96e472c8b6b50e86d8e58ca5 to your computer and use it in GitHub Desktop.
mysql on mac osx

Install and run mysql on mac os x

Instructions for installing mysql on mac os x via homebrew (a command line package manager for mac)

Install brew

Follow installation instructions at https://brew.sh/

Install mysql

Run this at a terminal prompt: brew install mysql

secure mysql installation

Run this at a terminal prompt: mysql.server start

Then run: mysql_secure_installation

and provide a strong root password. I'd recommend setting the Strong (2) requirement for passwords, and also saying Yes to all of the prompts - remove anonymous users, disallow root login remotely, remove test database, etc.

If you don't need mysql at the moment, stop it

Run this at a terminal prompt: mysql.server stop

To start mysql later, run

Run this at a terminal prompt: mysql.server start

If you want it to always start, run this:

Run this at a terminal prompt: brew services start mysql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment