macos MAMP - 升级到 MySQL 5.6
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9288577/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MAMP - Upgrade to MySQL 5.6
提问by Sabourinov
Is it possible to upgrade the MAMP MySQL library to 5.6 ?
是否可以将 MAMP MySQL 库升级到 5.6?
Or I'll need to install MySQL natively (Lion) ?
或者我需要本地安装 MySQL (Lion) ?
If someone could point me in the right direction...
如果有人能指出我正确的方向......
Thanks!
谢谢!
回答by Matt Gibson
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.
最新的 MAMP 有 MySQL 5.5.9。考虑到 MAMP 偶尔的不稳定和普遍缺乏支持,我会犹豫是否要在内部搞砸它来升级它。
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.
但是,禁用附带的 MySQL,单独安装 5.6,然后将其指向 MAMP MySQL 数据文件并没有错。您需要记住运行 MySQL 附带的升级脚本,因此最好先获取 MAMP 数据的副本并将其移动到新 MySQL 安装的数据文件夹中。
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.
首先使用 MAMP 的唯一原因是,弄乱 Apache 的内置副本会使文件共享停止工作,因此在不同的端口上使用 MAMP 更容易,但这不适用于 MySQL,因此您应该可以。
回答by Kimberely Thomas
It is possible. I have it running. Install MySQL
有可能的。我让它运行。安装 MySQL
http://dev.mysql.com/downloads/mysql/
http://dev.mysql.com/downloads/mysql/
Download the Mac version
下载 Mac 版本
Then change your mysql.sock in MAMP to the new one
然后将 MAMP 中的 mysql.sock 更改为新的
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
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
重启 MAMP
回答by Matthias Kleine
Found a solution on gist and modified it a bit:
在 gist 上找到了一个解决方案并对其进行了一些修改:
#!/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
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:
如果一切正常,您必须删除桌面上的 mySQL 备份。您可以通过在本地服务器上执行以下命令来检查当前的 mySQL-Version:
SHOW VARIABLES LIKE "%version%"
回答by Farzad Key
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
下载 MAMP 的官方脚本,将您的 MySQL 更新到 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.
对于那些绝对需要 MySQL 5.6 成为他们开发环境一部分的人 - 也许您是 Magento 开发人员 - 我们发布了一个 shell 脚本,将 MAMP 和 MAMP PRO 的 MySQL 组件更新到 v5.6。该脚本至少需要 MAMP 和 MAMP PRO 3.3,旧版本未经测试。
回答by Matthias Kleine
Since MAMP 4.x is released, just use that version / upgrade your existing MAMP installation. MySQL 5.6 is already included.
由于 MAMP 4.x 已发布,只需使用该版本/升级您现有的 MAMP 安装即可。MySQL 5.6 已经包含在内。