sh 将MAMP升级到Mysql 5.7

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 将MAMP升级到Mysql 5.7相关的知识,希望对你有一定的参考价值。

#!/bin/sh

wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.15-osx10.11-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 -arv --progress /Applications/MAMP ~/Desktop/MAMP-Backup

echo "copy bin"
sudo rsync -arv --progress mysql-5.7.*/bin/* /Applications/MAMP/Library/bin/ --exclude=mysqld_multi --exclude=mysqld_safe 

echo "copy share"
sudo rsync -arv --progress 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/
sudo chmod -R o+rw  "/Library/Application Support/appsolute/MAMP PRO/db/mysql/"

echo "starting mamp"
sudo /Applications/MAMP/bin/start.sh

echo "making symlink, enter sudo password"
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock

echo "migrate to new version"
/Applications/MAMP/Library/bin/mysql_upgrade -u root --password=root -h 127.0.0.1

以上是关于sh 将MAMP升级到Mysql 5.7的主要内容,如果未能解决你的问题,请参考以下文章

将 MySQL 5.6 升级到 5.7

如何将 MySQL 5.5.40 升级到 MySQL 5.7

markdown 将mysql升级到5.7后出错

如何将 AWS RDS Aurora MySQL 5.6 升级到 5.7

升级过程中从 5.6 到 5.7 的 AWS RDS MySQL 复制

升级到 Mountain Lion 后无法访问 MySQL 数据库(使用 MAMP)