-
-
Save dj1020/2abeced8aac98bdd1690 to your computer and use it in GitHub Desktop.
Upgrade MAMP to Mysql 5.7 tested by Ken Lin 2015/11/09
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/sh | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9-osx10.10-x86_64.tar.gz | |
tar xfvz mysql-5.7* | |
echo "stopping mamp" | |
sudo /Applications/MAMP/bin/stop.sh | |
sudo killall httpd mysqld | |
echo "creating backup" | |
sudo rsync -a /Applications/MAMP ~/Desktop/MAMP-Backup | |
echo "copy bin" | |
sudo rsync -av mysql-5.7.*/bin/* /Applications/MAMP/Library/bin/ --exclude=mysqld_multi --exclude=mysqld_safe | |
echo "copy share" | |
sudo rsync -av mysql-5.7.*/share/* /Applications/MAMP/Library/share/ | |
echo "fixing access (workaround)" | |
sudo chmod -R o+rw /Applications/MAMP/db/mysql/ | |
sudo chmod -R o+rw /Applications/MAMP/tmp/mysql/ | |
echo "starting mamp" | |
ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock | |
sudo /Applications/MAMP/bin/start.sh | |
echo "migrate to new version" | |
sudo chmod -R 777 /Applications/MAMP/db/mysql/ | |
/Applications/MAMP/Library/bin/mysql_upgrade --user=root --password=root --host=localhost --port=3306 |
Note: It might help anyone else
You might need to run the commands separately and refer to your correct path and mysql version. I did the following after manually downloading and installing mysql 5.7 (It appears under System preferences)
I ran the following commands.
cd to the location of your new mysql installation . i.e
cd /usr/local/
sudo rsync -av mysql/bin/* /Applications/MAMP/Library/bin/ --exclude=mysqld_multi --exclude=mysqld_safe
sudo chmod -R o+rw /Applications/MAMP/db/mysql56/
sudo chmod -R o+rw /Applications/MAMP/tmp/mysql56/
sudo chmod -R o+rw /Applications/MAMP/tmp/mysql/
ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
sudo chmod -R 777 /Applications/MAMP/db/mysql56
sudo chmod -R 777 /Applications/MAMP/db/mysql56/
/Applications/MAMP/Library/bin/mysql_upgrade --user=root --password=root --host=localhost --port=3306
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
I tried the above running each step manually on mac. I also appended --force to mysql_upgrade. However, I received the following warning message on my phpmyadmin
And on my command line, I received the following