天天看點

Upgrade MySQL Database from 5.5 to 5.6 on OSX 10.8 Mountan Lion

There is no upgrade option in the installer and you are presented with the 3 installations:

Upgrade MySQL Database from 5.5 to 5.6 on OSX 10.8 Mountan Lion

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:

and an ‘mysql’ directory alias is also created that points to the same location

which points to

Your previous installation is maintained and will be filed in the same location with the appropraite version you were using, like so:

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 :

So in this instance the previous mysql version was 5.5.13 – rename the new data directory and copy in the old one and fix file ownership to MySQL:

If you get errors on the first run, run the command again

In the latest version of MySQL 5.6 there is a default ‘my.cnf’ file that the database references that is now stored in:

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.

Related posts:

<a href="http://coolestguidesontheplanet.com/mysql-error-server-quit-without-updating-pid-file/" target="_blank">MySQL ERROR! The server quit without updating PID file</a>

<a href="http://coolestguidesontheplanet.com/optimising-mysql-on-os-x-10-7-lion-with-mysqltuner-pl/" target="_blank">Optimising MySQL on OS X 10.8 Mountain Lion with mysqltuner.pl</a>

<a href="http://coolestguidesontheplanet.com/start-stop-mysql-from-the-command-line-terminal-osx-linux/" target="_blank">Restart, Start, Stop MySQL from the Command Line Terminal, OSX, Linux</a>

<a href="http://coolestguidesontheplanet.com/how-to-change-the-mysql-root-password/" target="_blank">How to Change the MySQL root Password in Linux or OSX via Command Line</a>

<a href="http://coolestguidesontheplanet.com/import-a-mysql-database-into-os-x-10-6-via-terminal/" target="_blank">Import a mysql database into OS X 10.8 via Terminal</a>

本文轉自 h2appy  51CTO部落格,原文連結:http://blog.51cto.com/h2appy/1363989,如需轉載請自行聯系原作者

繼續閱讀