download php 8 mamp code example
Example: mamp pro 4.5 update mysql 5.7.23
echo "Getting MYsql 5.7"
wget https:
tar xfvz mysql-5.7.23-macos10.13-x86_64.tar.gz
echo "Stopping MAMP"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "Copy Bin"
sudo rsync -arv
echo "Copy Share"
sudo rsync -arv
echo "Building Mysql 5.7 Folder"
sudo cp -r /Applications/MAMP/db/mysql56 /Applications/MAMP/db/mysql57
sudo rm -fr /Applications/MAMP/db/mysql57/mysql/innodb_*
sudo rm -fr /Applications/MAMP/db/mysql57/mysql/slave_*
sudo chmod -R 0777 /Applications/MAMP/db/mysql57/
sed -i.bak 's/mysql56/mysql57/g' /Applications/MAMP/Library/bin/mysqld_safe
echo "Fixing Access (workaround)"
sudo chmod -R o+rw /Applications/MAMP/tmp/mysql/
echo "Updating MAMP socket"
sudo /Applications/MAMP/Library/bin/mysql_config_editor
echo "Starting MySQL"
sudo /Applications/MAMP/Library/bin/mysqld_safe
echo "Migrate, finaly, to new version"
sudo /Applications/MAMP/Library/bin/mysql_upgrade