Skip to content

Instantly share code, notes, and snippets.

@AndreKelling
Created March 13, 2019 09:29
Show Gist options
  • Save AndreKelling/669626bd37f020844e10eb13b2d91b38 to your computer and use it in GitHub Desktop.
Save AndreKelling/669626bd37f020844e10eb13b2d91b38 to your computer and use it in GitHub Desktop.
homebrew mysql mojave
# other fine brew commands regarding mysql service
mysql.server start
mysql.server stop
# don't really get the difference between before commands
# https://stackoverflow.com/questions/43418955/difference-between-brew-services-start-mysql-and-mysql-server-start
brew services start [email protected]
brew services stop [email protected]
mysql -u root -p
# had a hard time to configure a fresh mysql with brew on my machine
# there are plenty guides to find out there, but none really fit my case.
# maybe because of some strict permission settings in my /usr dir?!
# follow this guide https://medium.com/@at0dd/install-mysql-5-7-on-mac-os-mojave-cd07ec936034 until brew link --force [email protected]
brew uninstall mysql
brew uninstall [email protected]
rm -rf /usr/local/var/mysql
rm /usr/local/etc/my.cnf
brew install [email protected]
# manually create /usr/local/var/mysql dir
# run with your username (or any username just not root?!)
/usr/local/Cellar/[email protected]/5.7.25/bin/mysqld --initialize-insecure --user=mac --basedir=/usr/local/Cellar/[email protected]/5.7.25 --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start
# to set proper password
mysql_secure_installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment