-
-
Save pepijnblom/dcccad436bbadcf63867 to your computer and use it in GitHub Desktop.
Upgrade MAMP to Mysql 5.7
This file contains hidden or 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.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 | |
Hey thanks... for works perfectly on macOS High Sierra using this command at the end
sudo chmod -R 777 /Applications/MAMP/db/mysql/
I get broken pipe error wow
If possible, check if wget is present on MacOS machine. ;)
Great script
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
180308 13:33:58 mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
180308 13:33:58 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql56
2018-03-08T05:33:58.996372Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-03-08T05:33:58.998237Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2018-03-08T05:33:58.999395Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.15) starting as process 12828 ...
2018-03-08T05:33:59.014396Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql56/ is case insensitive
2018-03-08T05:33:59.026015Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-03-08T05:33:59.026112Z 0 [Note] InnoDB: Uses event mutexes
2018-03-08T05:33:59.026133Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-03-08T05:33:59.026151Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-03-08T05:33:59.028890Z 0 [Note] InnoDB: Number of pools: 1
2018-03-08T05:33:59.031586Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-03-08T05:33:59.033383Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-03-08T05:33:59.052874Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-03-08T05:33:59.069695Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-03-08T05:33:59.072734Z 0 [ERROR] InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5.7.9, and it appears corrupted. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading.html
2018-03-08T05:33:59.072808Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-03-08T05:33:59.382788Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-03-08T05:33:59.382870Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-03-08T05:33:59.382907Z 0 [ERROR] Failed to initialize plugins.
2018-03-08T05:33:59.382932Z 0 [ERROR] Aborting
2018-03-08T05:33:59.382978Z 0 [Note] Binlog end
2018-03-08T05:33:59.386145Z 0 [Note] Shutting down plugin 'CSV'
2018-03-08T05:33:59.390433Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete
180308 13:33:59 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended