Skip to content

Instantly share code, notes, and snippets.

@suderman
Created July 11, 2012 19:49
Show Gist options
  • Save suderman/3092825 to your computer and use it in GitHub Desktop.
Save suderman/3092825 to your computer and use it in GitHub Desktop.
After brew install mysql
#!/bin/sh
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start
mkdir -p ~/Library/LaunchAgents
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
cp "$(brew --prefix mysql)/homebrew.mxcl.mysql.plist" ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment