带有 MAMP 的 MySQL 不适用于 OSX Yosemite 10.10
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25333173/
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
MySQL with MAMP does not work with OSX Yosemite 10.10
提问by Florian Courtial
[EDIT] The last version of MAMP with the last version of OSX Yosemite works fine.
[编辑] 最新版本的 MAMP 和最新版本的 OSX Yosemite 工作正常。
I installed the beta of Yosemite two month ago, no problem with MAMP. With the last release of OSX, Apache and MySQL did not work.
我两个月前安装了优胜美地的测试版,MAMP 没有问题。在 OSX 的最后一个版本中,Apache 和 MySQL 不起作用。
I found a solution for Apache by using the default port 80 and renaming the file envvars to _envvars in Applications/MAMP/Library/bin but have not been able to solve the problem with MySQL.
我通过使用默认端口 80 并将文件 envvars 重命名为 Applications/MAMP/Library/bin 中的 _envvars 找到了 Apache 的解决方案,但无法解决 MySQL 的问题。
采纳答案by ihkawiss
Had same issue today (running last version of Yosemite preview), Apache of XAMPP for OSX didn't work / start. Apache's log files contained no errors.
今天有同样的问题(运行 Yosemite 预览版的最后一个版本),用于 OSX 的 XAMPP 的 Apache 无法工作/启动。Apache 的日志文件不包含任何错误。
Finally I've solved this issue by removing XAMPP for OSX and installing latest version of AMPPS (http://www.ampps.com/downloads).
最后,我通过删除 OSX 的 XAMPP 并安装最新版本的 AMPPS ( http://www.ampps.com/downloads)解决了这个问题。
I don't know what's the different or what's the initial problem causing this behaviour - but with AMPPS everything just runs fine.
我不知道有什么不同或导致这种行为的最初问题是什么 - 但是使用 AMPPS 一切正常。
Hopefully this will work also for you.
希望这也适用于您。
回答by shaimoom
Per the Knowledge Base at MAMP for "Apache will not start - Yosemite Beta":
根据 MAMP 上关于“Apache 无法启动 - Yosemite Beta”的知识库:
Rename the file
envvars
located in/Applications/MAMP/Library/bin
into_envvars
将
envvars
位于的文件重命名/Applications/MAMP/Library/bin
为_envvars
回答by Beltran
You can also try this workaround posted at http://community.bitnami.com/t/mysqld-doesnt-start-in-mac-os-yosemite/25153
您也可以尝试在http://community.bitnami.com/t/mysqld-doesnt-start-in-mac-os-yosemite/25153 上发布的此解决方法
/Applications/XAMPP/xamppfiles/xampp
Look for:
寻找:
$XAMPP_ROOT/bin/mysql.server start > /dev/null &
And add unset DYLD_LIBRARY_PATH on top of it. It should look like:
并在其上添加未设置的 DYLD_LIBRARY_PATH。它应该看起来像:
unset DYLD_LIBRARY_PATH
$XAMPP_ROOT/bin/mysql.server start > /dev/null &
I hope it helps
我希望它有帮助
回答by Sergey Kanareykin
On MAMP, I was able to get MySQL to work by editing /Applications/MAMP/bin/startMysql.shand unsetting DYLD_LIBRARY_PATH. So the updated script looks like this:
在 MAMP 上,我能够通过编辑/Applications/MAMP/bin/startMysql.sh并取消设置DYLD_LIBRARY_PATH来让 MySQL 工作。所以更新后的脚本如下所示:
# /bin/sh
unset DYLD_LIBRARY_PATH
/Applications/MAMP/Library/bin/mysqld_safe... etc.
It also required killing all MySQL processes previously started by MAMP.
它还需要杀死之前由 MAMP 启动的所有 MySQL 进程。
回答by eplazai
This solved my problem with mysqld and apache on XAMPP:
这解决了我在 XAMPP 上使用 mysqld 和 apache 的问题:
As you can see, Yosemite DP 5 changes a few things in its library. Probably if you're running XAMPP server on DP5 it won't start mysqld (MySQL database daemon).
如您所见,Yosemite DP 5 对其库中的一些内容进行了更改。可能如果您在 DP5 上运行 XAMPP 服务器,它可能不会启动 mysqld(MySQL 数据库守护程序)。
What you should do?.
你应该怎么做?。
STEP 1 . Download Homebrew. Open your terminal and then type: . . . ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
第1步 。下载自制软件。打开你的终端,然后输入:。. . ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
STEP 2: . Download LIBICONV, you have to type the following lines at terminal: . . . brew install libiconv . . . brew link libiconv —force
第2步: 。下载 LIBICONV,你必须在终端输入以下几行: . . . brew 安装 libiconv 。. . brew 链接 libiconv —force
STEP 3 . Download SQLITE3, you have to type the following lines at terminal: . . . brew install sqlite3 . . . brew link sqlite3 —force
第 3 步。下载 SQLITE3,你必须在终端输入以下几行: . . . brew 安装 sqlite3 。. . 酿造链接 sqlite3 —force
STEP 4 . Go to Applications/XAMPP/xamppfiles/lib and then delete the following files (remember to empty your trash). . . . libsqlite3.dylib (it is an ALIAS) . . . libsqlite3.0.8.6.dylib . . . libiconv.2.dylib . . . libiconv (it is an ALIAS).
第四步 。转到 Applications/XAMPP/xamppfiles/lib,然后删除以下文件(记得清空垃圾箱)。. . . libsqlite3.dylib(它是一个别名)。. . libsqlite3.0.8.6.dylib 。. . libiconv.2.dylib 。. . libiconv(它是一个别名)。
STEP 5 .Restart you “manager-osx.app” then try to turn on your mysql database.
STEP 5 .重启你的“manager-osx.app”,然后尝试打开你的mysql数据库。
Via: http://exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html
通过:http: //exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html
回答by elliotrock
OP question was about MAMP.
OP 问题是关于 MAMP。
I had this issue after installing OSX Yosemite and fixing the envvars
to _envvars
in the bin/apache2/bin
folder.
我安装OSX Yosemite和固定后出现这个问题envvars
到_envvars
了在bin/apache2/bin
文件夹中。
Then I was getting this socket error. So I checked the error logs for mysql and noticed this:
然后我收到了这个套接字错误。所以我检查了mysql的错误日志并注意到了这一点:
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
gee I love error logs.
哎呀我喜欢错误日志。
I found the process mysqld in Activity Monitor and killed it. Restarted MAMP and bingo! It all seems to hook up now!
我在活动监视器中找到了进程 mysqld 并杀死了它。重新启动 MAMP 和宾果游戏!现在这一切似乎都联系起来了!
回答by Splirus
I have resolved the situation by changing the default Port of Apache 2.4 updated after upgrading to MAC OS Yosemite.
我通过更改升级到 MAC OS Yosemite 后更新的 Apache 2.4 的默认端口解决了这个问题。
The file is located in: /etc/apache2/httpd.conf
该文件位于:/etc/apache2/httpd.conf
Change Listen 80 to Listen 8080
将监听 80 更改为监听 8080
Restart your MAC, and try to launch again MAMP Services.
重新启动您的 MAC,并尝试再次启动 MAMP 服务。
回答by Thiago Pereira
Edit the below file, with this command on Terminal.app:
在 Terminal.app 上使用此命令编辑以下文件:
sudo vim /Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh
On line #59, delete this:
在第 59 行,删除这个:
/Applications/XAMPP/xamppfiles/xampp startmysql > /dev/null &
and put this
并把这个
/Applications/XAMPP/xamppfiles/bin/mysql.server start > /dev/null &
(save the file: ESC :wq!)
(保存文件:ESC :wq!)
Restart All Servers on XAMPP.app (manager-osx)
在 XAMPP.app (manager-osx) 上重启所有服务器
回答by brdflp
I still needed to use envars so I was able to work around this by removing the following from the file. Found some errors when launching through terminal related to this
我仍然需要使用 envars,所以我能够通过从文件中删除以下内容来解决这个问题。通过与此相关的终端启动时发现一些错误
if test "x$DYLD_LIBRARY_PATH" != "x" ; then
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
else
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib"
fi
export DYLD_LIBRARY_PATH
回答by urnotsam
I fixed this by uninstalling XAMMP and reinstalling. If you go with this approach make sure to back up any content you may have saved in the XAMPP folder.
我通过卸载 XAMMP 并重新安装来解决此问题。如果您采用这种方法,请确保备份您可能已保存在 XAMPP 文件夹中的任何内容。