Created
May 31, 2017 00:43
-
-
Save calvinjuarez/a55bb22a0a2eae45f1d932347041c4df to your computer and use it in GitHub Desktop.
Command line script for restarting MAMP's MySQL server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Restarting MAMP's MySQL server." | |
# stop mysql | |
/Applications/MAMP/bin/stopMysql.sh | |
# MAMP needs this tmpdir to work, but doesn't create it itself | |
mkdir -p /Applications/MAMP/tmp/mysql/tmpdir/ | |
# start mysql | |
/Applications/MAMP/Library/bin/mysqld_safe --port=3306 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --log-error=/Applications/MAMP/logs/mysql_error_log.err &>/dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment