MySQL version 5.6.14 is available for download for OSX, a double click and install is available named Mac OS X ver. 10.7 (x86, 64-bit), DMG Archive. (Don’t worry about the 10.7 naming, Works fine in OSX 10.9 and OSX 10.8)
sudo /usr/local/mysql/support-files/mysql.server stop
There is no upgrade option in the installer and you are presented with the 3 installations:
You need to install all the three installers.
Control/Right click the mysql-5.6…pkg to avoid the security GateKeeper. Follow the installation processes.
MySQL data and files will be stored at:
/usr/local/mysql-5.6.14-osx10.7-x86_64
and an ‘mysql’ directory alias is also created that points to the same location
/usr/local/mysql
which points to
mysql -> mysql-5.6.14-osx10.7-x86_64
Your previous installation is maintained and will be filed in the same location with the appropraite version you were using, like so:
/usr/local/mysql-5.5.13-osx10.6-x86_6
What needs to be done is to migrate the database and tables to the new version.
The key directory from the previous instance that needs to be copied is :
/usr/local/mysql-5.5.13-osx10.6-x86_64/data
So in this instance the previous mysql version was 5.5.13 �C rename the new data directory and copy in the old one and fix file ownership to MySQL:
sudo mv /usr/local/mysql-5.6.14-osx10.7-x86_64/data /usr/local/mysql-5.6.14-osx10.7-x86_64/dataold
sudo cp -rf /usr/local/mysql-5.5.13-osx10.6-x86_64/data /usr/local/mysql-5.6.14-osx10.7-x86_64/
sudo chown -R _mysql /usr/local/mysql-5.6.14-osx10.7-x86_64/data
sudo /usr/local/mysql/support-files/mysql.server start
/usr/local/mysql/bin/mysql_upgrade
If you get errors on the first run, run the command again
sudo /usr/local/mysql/support-files/mysql.server restart
/usr/local/mysql/bin/mysql
/usr/local/mysql/bin/mysqladmin -u root password 'yourpasswordhere'
In the latest version of MySQL 5.6 there is a default ‘my.cnf’ file that the database references that is now stored in:
/usr/local/mysql-5.6.14-osx10.7-x86_64/my.cnf
So if you have made any customisations to the behaviour of MySQL then these will now need to be added in the new my.cnf file and make a copy to /etc so any global changes will be read in when MySQL is launched.