带有MAMP的MySQL不适用于OSX Yosemite 10.10

时间:2021-12-05 06:37:34

[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.

两个月前我安装了优胜美地的测试版,没有问题。随着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找到了Apache的解决方案,并在Applications / MAMP / Library / bin中将文件envvars重命名为_envvars,但是无法解决MySQL的问题。

15 个解决方案

#1


6  

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预览版的最后一个版本),XAMPP for OSX的Apache没有工作/启动。 Apache的日志文件不包含任何错误。

Finally I've solved this issue by removing XAMPP for OSX and installing latest version of AMPPS (http://www.ampps.com/downloads).

最后,我通过删除XAMPP for OSX并安装最新版本的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.

希望这也适合你。

#2


59  

Per the Knowledge Base at MAMP for "Apache will not start - Yosemite Beta":

根据MAMP的知识库,“Apache将无法启动 - 优胜美地测试版”:

Rename the file envvars located in /Applications/MAMP/Library/bin into _envvars

将位于/ Applications / MAMP / Library / bin中的文件envvars重命名为_envvars

#3


13  

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

我希望它有所帮助

#4


11  

On MAMP, I was able to get MySQL to work by editing /Applications/MAMP/bin/startMysql.sh and 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进程。

#5


4  

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 。下载Homebrew。打开终端,然后键入:。 。 。 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。 。 。 brew link 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).

步骤4 。转到Applications / XAMPP / xamppfiles / lib,然后删除以下文件(记得清空垃圾箱)。 。 。 。 libsqlite3.dylib(它是一个ALIAS)。 。 。 libsqlite3.0.8.6.dylib。 。 。 libiconv.2.dylib。 。 。 libiconv(它是一个ALIAS)。

STEP 5 .Restart you “manager-osx.app” then try to turn on your mysql database.

步骤5.重新启动“manager-osx.app”然后尝试打开你的mysql数据库。

Via: http://exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html

通过:http://exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html

#6


3  

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修复到bin / apache2 / bin文件夹中的_envvars后,我遇到了这个问题。

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:无法锁定./ibdata1,错误:35 InnoDB:检查您是否还有其他mysqld进程

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!

我在Activity Monitor中找到了mysqld进程并将其杀死。重启MAMP和宾果游戏!这一切似乎现在都挂了!

#7


1  

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

将Listen 80改为Listen 8080

Restart your MAC, and try to launch again MAMP Services.

重新启动您的MAC,并尝试再次启动MAMP服务。

#8


0  

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文件夹中保存的所有内容。

#9


0  

I am also running into the same problem with MAMP. Absolutely clueless but with the other responses pointing toward a recent update in OSX I can believe that the problem stems from here. Uninstalled and reinstalled MAMP and MySQL is the only operation able to run...Apache still hangs. Will be downloading AMPPS to see if this corrects things.

我也遇到了与MAMP相同的问题。绝对无能,但随着其他回应指向OSX最近的更新我可以相信问题源于此处。卸载并重新安装MAMP和MySQL是唯一能够运行的操作...... Apache仍然挂起。将下载AMPPS以查看是否可以解决问题。

#10


0  

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

#11


0  

I have had the same issue and none of the above worked.

我有同样的问题,上述都没有。

The Apache server in MAMP wouldn't work on port 80, or 8080 (The default Apache ports). The issue is with Apache being enabled by default in Yosemite.

MAMP中的Apache服务器无法在端口80或8080(默认Apache端口)上运行。问题是默认情况下在Yosemite中启用Apache。

Either: change the Apache port in MAMP (Not preferable if you want to use the default port), or unload the launch Daemon by typing the following into the terminal:

或者:更改MAMP中的Apache端口(如果要使用默认端口,则不可取),或者通过在终端中键入以下内容来卸载启动守护程序:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

#12


0  

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)

#13


0  

Just to add to this thread, for those running Bitnami MAMP I had the same issue when upgrading to Yosemite (Mampstack-5.4.28-0). I solved it by going to

只是为了添加到这个线程,对于那些运行Bitnami MAMP的人,我在升级到Yosemite(Mampstack-5.4.28-0)时遇到了同样的问题。我去了解决了

Applications/Mampstack-(your version)/mysql/scripts/ctl.sh

Applications / Mampstack-(您的版本)/mysql/scripts/ctl.sh

and adding the following

并添加以下内容

MYSQL_PIDFILE = ....

unset DYLD_LIBRARY_PATH <==== Add this

MYSQL_START = ....

MYSQL spun like silk. Hope this helps someone with the same problem.

MYSQL像丝绸一样旋转。希望这可以帮助有同样问题的人。

#14


0  

I've found this video. This works for me.

我找到了这个视频。这对我有用。

Go to MAMP in Applications

在应用程序中转到MAMP

then, bin > apache2 > bin and rename 'envvars' to '_envvars'

然后,bin> apache2> bin并将'envvars'重命名为'_envvars'

https://www.youtube.com/watch?v=brpKAM2WXhk

https://www.youtube.com/watch?v=brpKAM2WXhk

#15


0  

Above solutions didn't work for me as I had no conflicting mysqld instances running. After check the mysql error logs in MAMP, it was obvious msqld was having all sorts of issues starting. The main error was:

以上解决方案对我没有用,因为我没有运行冲突的mysqld实例。在检查了MAMP中的mysql错误日志后,显然msqld开始出现各种问题。主要错误是:

[ERROR] /Applications/MAMP/Library/bin/mysqld: unknown option '--//skip-networking'

Which pointed me to an option in my.conf file. Somewhere along the line with debugging another issue I had added:

这指向了my.conf文件中的一个选项。在调试另一个问题的地方,我添加了:

//skip-networking

As an option or I had commented it out. Removing that line allowed mysql in MAMP to start correctly.

作为一种选择,或者我已经评论过了。删除该行允许MAMP中的mysql正确启动。

#1


6  

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预览版的最后一个版本),XAMPP for OSX的Apache没有工作/启动。 Apache的日志文件不包含任何错误。

Finally I've solved this issue by removing XAMPP for OSX and installing latest version of AMPPS (http://www.ampps.com/downloads).

最后,我通过删除XAMPP for OSX并安装最新版本的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.

希望这也适合你。

#2


59  

Per the Knowledge Base at MAMP for "Apache will not start - Yosemite Beta":

根据MAMP的知识库,“Apache将无法启动 - 优胜美地测试版”:

Rename the file envvars located in /Applications/MAMP/Library/bin into _envvars

将位于/ Applications / MAMP / Library / bin中的文件envvars重命名为_envvars

#3


13  

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

我希望它有所帮助

#4


11  

On MAMP, I was able to get MySQL to work by editing /Applications/MAMP/bin/startMysql.sh and 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进程。

#5


4  

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 。下载Homebrew。打开终端,然后键入:。 。 。 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。 。 。 brew link 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).

步骤4 。转到Applications / XAMPP / xamppfiles / lib,然后删除以下文件(记得清空垃圾箱)。 。 。 。 libsqlite3.dylib(它是一个ALIAS)。 。 。 libsqlite3.0.8.6.dylib。 。 。 libiconv.2.dylib。 。 。 libiconv(它是一个ALIAS)。

STEP 5 .Restart you “manager-osx.app” then try to turn on your mysql database.

步骤5.重新启动“manager-osx.app”然后尝试打开你的mysql数据库。

Via: http://exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html

通过:http://exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html

#6


3  

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修复到bin / apache2 / bin文件夹中的_envvars后,我遇到了这个问题。

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:无法锁定./ibdata1,错误:35 InnoDB:检查您是否还有其他mysqld进程

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!

我在Activity Monitor中找到了mysqld进程并将其杀死。重启MAMP和宾果游戏!这一切似乎现在都挂了!

#7


1  

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

将Listen 80改为Listen 8080

Restart your MAC, and try to launch again MAMP Services.

重新启动您的MAC,并尝试再次启动MAMP服务。

#8


0  

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文件夹中保存的所有内容。

#9


0  

I am also running into the same problem with MAMP. Absolutely clueless but with the other responses pointing toward a recent update in OSX I can believe that the problem stems from here. Uninstalled and reinstalled MAMP and MySQL is the only operation able to run...Apache still hangs. Will be downloading AMPPS to see if this corrects things.

我也遇到了与MAMP相同的问题。绝对无能,但随着其他回应指向OSX最近的更新我可以相信问题源于此处。卸载并重新安装MAMP和MySQL是唯一能够运行的操作...... Apache仍然挂起。将下载AMPPS以查看是否可以解决问题。

#10


0  

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

#11


0  

I have had the same issue and none of the above worked.

我有同样的问题,上述都没有。

The Apache server in MAMP wouldn't work on port 80, or 8080 (The default Apache ports). The issue is with Apache being enabled by default in Yosemite.

MAMP中的Apache服务器无法在端口80或8080(默认Apache端口)上运行。问题是默认情况下在Yosemite中启用Apache。

Either: change the Apache port in MAMP (Not preferable if you want to use the default port), or unload the launch Daemon by typing the following into the terminal:

或者:更改MAMP中的Apache端口(如果要使用默认端口,则不可取),或者通过在终端中键入以下内容来卸载启动守护程序:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

#12


0  

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)

#13


0  

Just to add to this thread, for those running Bitnami MAMP I had the same issue when upgrading to Yosemite (Mampstack-5.4.28-0). I solved it by going to

只是为了添加到这个线程,对于那些运行Bitnami MAMP的人,我在升级到Yosemite(Mampstack-5.4.28-0)时遇到了同样的问题。我去了解决了

Applications/Mampstack-(your version)/mysql/scripts/ctl.sh

Applications / Mampstack-(您的版本)/mysql/scripts/ctl.sh

and adding the following

并添加以下内容

MYSQL_PIDFILE = ....

unset DYLD_LIBRARY_PATH <==== Add this

MYSQL_START = ....

MYSQL spun like silk. Hope this helps someone with the same problem.

MYSQL像丝绸一样旋转。希望这可以帮助有同样问题的人。

#14


0  

I've found this video. This works for me.

我找到了这个视频。这对我有用。

Go to MAMP in Applications

在应用程序中转到MAMP

then, bin > apache2 > bin and rename 'envvars' to '_envvars'

然后,bin> apache2> bin并将'envvars'重命名为'_envvars'

https://www.youtube.com/watch?v=brpKAM2WXhk

https://www.youtube.com/watch?v=brpKAM2WXhk

#15


0  

Above solutions didn't work for me as I had no conflicting mysqld instances running. After check the mysql error logs in MAMP, it was obvious msqld was having all sorts of issues starting. The main error was:

以上解决方案对我没有用,因为我没有运行冲突的mysqld实例。在检查了MAMP中的mysql错误日志后,显然msqld开始出现各种问题。主要错误是:

[ERROR] /Applications/MAMP/Library/bin/mysqld: unknown option '--//skip-networking'

Which pointed me to an option in my.conf file. Somewhere along the line with debugging another issue I had added:

这指向了my.conf文件中的一个选项。在调试另一个问题的地方,我添加了:

//skip-networking

As an option or I had commented it out. Removing that line allowed mysql in MAMP to start correctly.

作为一种选择,或者我已经评论过了。删除该行允许MAMP中的mysql正确启动。