Skip to content

Instantly share code, notes, and snippets.

@olibob
Created December 8, 2012 20:34
Show Gist options
  • Save olibob/4241802 to your computer and use it in GitHub Desktop.
Save olibob/4241802 to your computer and use it in GitHub Desktop.
mysql: MacOS X install
brew remove mysql
brew cleanup
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
rm ~/Library/LaunchAgents/com.mysql.mysqld.plist
sudo rm -rf /usr/local/var/mysql
I then started from scratch:
installed mysql with
brew install mysql
run the commands brew suggested:
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Start mysql with mysql.server command, to be able to log on it
Used the alternate security script:
/usr/local/Cellar/mysql/5.5.10/bin/mysql_secure_installation
Followed the launchctl section from the brew package script output
To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
Fix 2002 connection error with phpmyadmin
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Fix blowfish password error with phpmyadmin
In the phpmyadmin directory, copy config.sample.inc.php to config.inc.php
Boom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment