Skip to content

Instantly share code, notes, and snippets.

@vijinho
Last active February 5, 2016 22:23
Show Gist options
  • Save vijinho/4b400e1a1a615ed53ec2 to your computer and use it in GitHub Desktop.
Save vijinho/4b400e1a1a615ed53ec2 to your computer and use it in GitHub Desktop.
MAMP Start MySQL with my.cnf configuration file
# /bin/sh
#
# If there is a MySQL configuration file present in the MAMP conf directory,
# use it as the only configuration file processed by MySQL. Otherwise use the
# sequence of MySQL configuration files as defined in the MySQL documentation:
#
# http://dev.mysql.com/doc/refman/5.5/en/option-files.html
/Applications/MAMP/bin/stopMysql.sh
[ -r /Applications/MAMP/conf/my.cnf ] &&
a='--defaults-extra-file=/Applications/MAMP/conf/my.cnf'
/Applications/MAMP/Library/bin/mysqld \
$a \
--plugin-dir=/Applications/MAMP/Library/lib/plugin \
--tmpdir=/Applications/MAMP/tmp/mysql/tmpdir \
--log-error=/Applications/MAMP/logs/mysql_error.log \
--pid-file=/Applications/MAMP/tmp/mysql/mysql.pid \
--socket=/Applications/MAMP/tmp/mysql/mysql.sock --port=3306 &
tail -f /Applications/MAMP/logs/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment