2012-12-31 128 views
9

我在Mac OSX Mountain Lion上。 Xamppp不會讓我啓動MySQL服務器。Xampp無法在Mac OSX上啓動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 
: 
+0

尾-2 /選擇/ LAMPP /日誌/ error_log中 –

+0

@JonathandeM。嘿,我正在使用Xamppp而不是Lampp?無論如何,我將如何使用該命令? – Josh

+0

尾-2的/ opt/XAMPP /日誌/ error_log中,使用自動完成,我不知道的路徑 –

回答

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 

,你應該在你的MySQL進程的名稱取代「mysqld_safe5」終止進程。這很可能是「mysqld」。

之後,你可以嘗試重新啓動服務器,並檢查它是否工作。

+0

爲什麼'須藤PS aux',而不是僅僅'PS aux'? –

+0

我從你正試圖通過剛剛粘貼到日誌文件終端的名稱,即可查看您的error.log中看到的截圖,通過做這個bash假設你正在那條路上運行一個腳本,試試運行「less/Applications/XAMPP/xamppfiles/logs/error_log」而不是 – Max

+0

@WaleedKhan它應該在沒有sudo的情況下運行,但是我不知道它是否會顯示root – Max

0

首先讀位於/應用/ XAMPP/xamppfiles /日誌/ error_log中錯誤文件,通常這如果已經在端口3306上運行了某個錯誤。

+0

我打開該文件並在終端上添加了它的截圖,上面添加了它,我如何查看error_log? , – Josh

+0

請檢查您是否已經把對EG-/應用程序根文件夾XAMPP文件夾,如果你已經把根以外的XAMPP文件夾(嵌套像(/應用程序一定程度/ ABC/XAMPP)比有時及牡丹問題。 –

+0

是的這是defitely根文件夾。 – Josh

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

解決了我的問題。請參閱 - StackOverflow question

但是做在生產服務器做到這一點,你可能需要更改所有者或組(chownchgrp來解決問題

+0

感謝哥們,你的解決方案也解決了我的問題:)。 –

+0

這也解決了我的問題。謝謝。 – pmandell

+0

這工作!謝謝 – Daniel

0

我有同樣的問題,而是設法解決。它通過將my.cnf替換爲原始文件。 它具有以下行刪除解決了問題。

listen 80 
0

你應該嘗試配置您的MySQL數據庫和改變你的端口從3306到3307,這爲我工作。有時候這個端口很忙,不適合你的電腦。

+0

你意識到原來的問題是在2012年發佈的,對嗎? – Mike