Created
January 28, 2016 10:48
-
-
Save tagliala/d5a7a0ebba4bdfef60e9 to your computer and use it in GitHub Desktop.
Switch from mysql56 to mysql
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 | |
if mysql --version | grep -q "Distrib 5.6" | |
then | |
echo "Deactivating MySQL 5.6"; | |
mysql.server stop | |
brew unlink mysql56 | |
mv /usr/local/var/mysql /usr/local/var/mysql56 | |
mv /usr/local/var/mysql.prev /usr/local/var/mysql | |
brew link mysql | |
else | |
echo "Activating MySQL 5.6"; | |
mysql.server stop | |
brew unlink mysql | |
mv /usr/local/var/mysql /usr/local/var/mysql.prev | |
mv /usr/local/var/mysql56 /usr/local/var/mysql | |
brew link mysql56 | |
fi | |
echo "Please reboot the machine"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment