Sabourinov
Sabourinov

Reputation: 297

MAMP - Upgrade to MySQL 5.6

Is it possible to upgrade the MAMP MySQL library to 5.6 ?

Or I'll need to install MySQL natively (Lion) ?

If someone could point me in the right direction...

Thanks!

Upvotes: 19

Views: 18957

Answers (5)

Matthias Kleine
Matthias Kleine

Reputation: 1235

Since MAMP 4.x is released, just use that version / upgrade your existing MAMP installation. MySQL 5.6 is already included.

Upvotes: 0

Farzad Key
Farzad Key

Reputation: 61

Download the official script by MAMP to update your MySQL to 5.6.12 http://blog-en.mamp.info/2015/07/how-to-use-mysql-5-6-with-mamp-and-mamp.html

For those of you who absolutely require MySQL 5.6 to be part of their development environment - maybe you are a Magento developer - we have released a shell script that updates the MySQL component of MAMP and MAMP PRO to v5.6. The script requires at least MAMP and MAMP PRO 3.3, older versions are untested.

Upvotes: 4

Matthias Kleine
Matthias Kleine

Reputation: 1235

Found a solution on gist and modified it a bit:

#!/bin/sh

wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.22-osx10.9-x86_64.tar.gz
tar xfvz mysql-5.6*
rm mysql-5.6.22-osx10.9-x86_64.tar.gz

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.6.*/bin/* /Applications/MAMP/Library/bin/ --exclude=mysqld_multi --exclude=mysqld_safe 

echo "copy share"
sudo rsync -av mysql-5.6.*/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"
sudo /Applications/MAMP/bin/start.sh

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

https://gist.github.com/tobi-pb/b9426db51f262d88515c

If everything worked, you have to delete the mySQL backup on your desktop. You can check the current mySQL-Version by executing the following command on your local server:

SHOW VARIABLES LIKE "%version%"

Upvotes: 10

Kimberely Thomas
Kimberely Thomas

Reputation: 201

It is possible. I have it running. Install MySQL

http://dev.mysql.com/downloads/mysql/

Download the Mac version

Then change your mysql.sock in MAMP to the new one

mv /Applications/MAMP/tmp/mysql/mysql.sock /Applications/MAMP/tmp/mysql/mysql.sock.back

ln -s /var/mysql/mysql.sock /Applications/MAMP/tmp/mysql/mysql.sock

Restart MAMP

Upvotes: 10

Matt Gibson
Matt Gibson

Reputation: 14949

The latest MAMP has MySQL 5.5.9. Given the occasional wonkiness of MAMP and general lack of support, I'd be hesitant to mess about with it internally to upgrade it.

However, there's nothing wrong with disabling the MySQL that comes with it, installing 5.6 separately, then pointing it at the MAMP MySQL data files. You'll need to remember to run the upgrade script that comes with MySQL, so probably best to take a copy of the MAMP data first and move it to the data folder of the new MySQL install.

The only reason to use MAMP in the first place is that messing about with the built in copy of Apache can make file sharing stop working, so it's easier to use MAMP instead on a different port, but this doesn't apply to MySQL so you should be OK.

Upvotes: 10

Related Questions