Xampp无法在Mac OSX上启动MySQL服务器?

时间:2012-12-31 04:22:47

标签: mysql macos osx-lion xampp

我在Mac OSX Mountain Lion上。 Xampp不会让我启动MySQL服务器。

我已为XAMPP文件夹中的每个人和每个文件设置了读/写权限。

enter image description here

错误消息显示“操作无法完成。(XAMPPErrorDomain错误1。)”

关于如何阻止其他MySQL进程的任何想法。我已经尝试过关于修复端口冲突的Lynda.com教程。我试着在终端输入这个命令“sudo lsof -i -P | grep 3306”。

然而它没有用,我想测试看MySQL是否正在运行但是没有返回。如何检查是否有其他版本正在运行,然后停止任何其他MySQL服务器/卸载其他可能的版本?

这是错误日志截图?那是你在找什么? enter image description here

enter image description here

以下是错误日志:

[Tue Dec 11 10:46:28 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Dec 11 10:46:29 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 11 10:46:29 2012] [notice] Digest: done
[Tue Dec 11 10:46:29 2012] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 11 11:00:02 2012] [notice] caught SIGTERM, shutting down
[Tue Dec 11 11:00:33 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Dec 11 11:00:34 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 11 11:00:34 2012] [notice] Digest: done
[Tue Dec 11 11:00:34 2012] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 11 14:14:23 2012] [notice] caught SIGTERM, shutting down
[Tue Dec 11 14:17:31 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Dec 11 14:17:32 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 11 14:17:32 2012] [notice] Digest: done
[Tue Dec 11 14:17:32 2012] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
sendmail: fatal: chdir /Library/Server/Mail/Data/spool: No such file or directory
sendmail: fatal: chdir /Library/Server/Mail/Data/spool: No such file or directory
[Tue Dec 11 16:07:41 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/jessleigh/wp-admin/function.unlink, referer: http://localhost/jessleigh/wp-admin/admin.php?page=functions.php
[Tue Dec 11 16:41:51 2012] [notice] caught SIGTERM, shutting down
[Tue Dec 11 17:08:44 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Dec 11 17:08:45 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 11 17:08:45 2012] [notice] Digest: done
[Tue Dec 11 17:08:45 2012] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 11 17:38:02 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/xampp/jessleigh
[Tue Dec 11 17:57:29 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/xampp/jessleigh
[Tue Dec 11 17:57:39 2012] [notice] caught SIGTERM, shutting down
[Tue Dec 11 17:57:44 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Dec 11 17:57:45 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 11 17:57:45 2012] [notice] Digest: done
[Tue Dec 11 17:57:45 2012] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 11 17:57:46 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/xampp/jessleigh
[Tue Dec 11 17:57:47 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/xampp/jessleigh
[Tue Dec 11 17:58:01 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/xampp/jessleigh
[Tue Dec 11 19:57:16 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/jessleigh/sample-page, referer: http://localhost/jessleigh/
[Tue Dec 11 20:07:09 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/jessleigh/sample-page, referer: http://localhost/jessleigh/
[Tue Dec 11 20:31:33 2012] [error] [client 127.0.0.1] File does not exist: /Applications/XAMPP/xamppfiles/htdocs/jessleigh/home, referer: http://localhost/jessleigh/wp-admin/post.php?post=41&action=edit&message=6
[Fri Dec 14 13:15:33 2012] [notice] caught SIGTERM, shutting down
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[Fri Dec 14 18:20:53 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Dec 14 18:20:54 2012] [notice] Digest: generating secret for digest authentication ...
[Fri Dec 14 18:20:54 2012] [notice] Digest: done
[Fri Dec 14 18:20:54 2012] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Fri Dec 14 18:24:24 2012] [notice] caught SIGTERM, shutting down
[Tue Dec 18 12:00:06 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Dec 18 12:00:07 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 12:00:07 2012] [notice] Digest: done
[Tue Dec 18 12:00:07 2012] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
:

7 个答案:

答案 0 :(得分:33)

您可以通过在终端

中执行来检查是否有任何mysql实例正在运行
sudo ps aux | grep mysql

这将列出名称中包含mysql的所有进程。

_mysql          18943   0,0  0,5  2514608  20340 s008  S+    5:46am   0:00.07   /opt/local/libexec/mysqld --basedir=/opt/local --datadir=/opt/local/var/db/mysql5 --  user=_mysql --log-error=/opt/local/var/db/mysql5/Max-NB.local.err --pid-  file=/opt/local/var/db/mysql5/Max-NB.local.pid
root            18900   0,0  0,1  2439964   2592 s008  S+    5:46am   0:00.15 /bin/sh   /opt/local/bin/mysqld_safe5
root            18899   0,0  0,1  2439396   2616 s008  S+    5:46am   0:00.02 sudo   mysqld_safe5

然后您可以通过执行

来终止该过程
sudo killall mysqld_safe5

你应该替换" mysqld_safe5"通过你的mysql进程的名称。这很可能是" mysqld"。

之后,您可以尝试重新启动服务器并检查它是否有效。

答案 1 :(得分:11)

chmod -R 777 /Applications/XAMPP/xamppfiles/var

为我解决了这个问题。请参阅 - StackOverflow question

但是在生产服务器中执行此操作,您可能需要更改所有者或组(chownchgrp以解决问题。

答案 2 :(得分:0)

首先读取位于 / Applications / XAMPP / xamppfiles / logs / error_log 的错误文件,通常如果在端口3306上运行了某些内容,则会出现此错误。

答案 3 :(得分:0)

我遇到了同样的问题,但设法通过用原始文件替换my.cnf来解决它。 它有以下行删除,解决了这个问题。

listen 80

答案 4 :(得分:0)

您应该尝试配置MySql数据库并将端口从3306更改为3307,这对我来说很有用。有时这个端口很忙,对你的电脑不起作用。

答案 5 :(得分:0)

查看错误日志,您可能会发现:

[错误] tc日志中的恶魔标题
[错误]无法初始化日志

删除/Applications/XAMPP/xamppfiles/var/mysql/tc.log并重新启动mysql

答案 6 :(得分:-2)

你可以在你的 Mac book 上使用 MAMP PRO。但是有一个问题,如果你不注册或不激活它只能工作 14 天。

我在这里分享一些截图...

1.安装后,打开并选择phpMyAdmin1

2.接下来你去数据库2

3.然后您可以创建数据库并在那里添加列3