我試圖讓XAMPP在Win7/64上測試Wordpress主題。XAMPP設置 - MySQL不工作
我最初遇到Apache試圖訪問 端口80的問題,但我被告知要將配置文件更改爲81端口,我已經完成了,現在Apache正在運行,localhost:81顯示XAMPP控制面板正常。
但是,現在MySQL根本不工作。在我更改配置文件之前,我認爲是這樣,但是Apache沒有運行,所以我仍然無法訪問本地主機。
在Windows事件查看器中,我得到的MySQL的這個錯誤報告:
Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
在XAMPP的控制檯我目前得到這個:
17:07:36 [main] Initializing Control Panel
17:07:36 [main] Windows Version: Windows 7 Ultimate SP1 64-bit
17:07:36 [main] XAMPP Version: 1.8.1
17:07:36 [main] Control Panel Version: 3.1.0 3.1.0 [ Compiled: September 20th 2012 ]
17:07:36 [main] Running with Administrator rights - good!
17:07:36 [main] XAMPP Installation Directory: "c:\xampp\"
17:07:37 [main] Checking for prerequisites
17:07:37 [main] All prerequisites found
17:07:37 [main] Initializing Modules
17:07:37 [Apache] Problem detected!
17:07:37 [Apache] Port 80 in use by "system"!
17:07:37 [Apache] Apache WILL NOT start without the configured ports free!
17:07:37 [Apache] You need to uninstall/disable/reconfigure the blocking application
17:07:37 [Apache] or reconfigure Apache to listen on a different port
17:07:37 [Apache] XAMPP Apache is already running on port 443
17:07:37 [main] Starting Check-Timer
17:07:37 [main] Control Panel Ready
17:07:40 [mysql] Attempting to start MySQL app...
17:07:40 [mysql] Status change detected: running
17:07:41 [mysql] Status change detected: stopped
17:07:41 [mysql] Error: MySQL shutdown unexpectedly.
17:07:41 [mysql] This may be due to a blocked port, missing dependencies,
17:07:41 [mysql] improper privileges, a crash, or a shutdown by another method.
17:07:41 [mysql] Check the "/xampp/mysql/data/mysql_error.log" file
17:07:41 [mysql] and the Windows Event Viewer for more clues
17:07:47 [mysql] Attempting to start MySQL app...
,這裏是錯誤日誌爲MySQL :
130301 16:28:14 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:28:14 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:28:14 InnoDB: Completed initialization of buffer pool
130301 16:28:14 InnoDB: highest supported file format is Barracuda.
130301 16:28:15 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:28:15 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:28:43 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:28:43 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:28:43 InnoDB: Completed initialization of buffer pool
130301 16:28:43 InnoDB: highest supported file format is Barracuda.
130301 16:28:43 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:28:43 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:28:51 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:28:51 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:28:51 InnoDB: Completed initialization of buffer pool
130301 16:28:51 InnoDB: highest supported file format is Barracuda.
130301 16:28:52 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:28:52 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:30:07 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:30:07 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:30:07 InnoDB: Completed initialization of buffer pool
130301 16:30:07 InnoDB: highest supported file format is Barracuda.
130301 16:30:07 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:30:07 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:30:35 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:30:35 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:30:35 InnoDB: Completed initialization of buffer pool
130301 16:30:35 InnoDB: highest supported file format is Barracuda.
130301 16:30:35 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:30:35 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:30:43 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:30:43 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:30:43 InnoDB: Completed initialization of buffer pool
130301 16:30:43 InnoDB: highest supported file format is Barracuda.
130301 16:30:43 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:30:43 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:30:56 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:30:56 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:30:56 InnoDB: Completed initialization of buffer pool
130301 16:30:56 InnoDB: highest supported file format is Barracuda.
130301 16:30:57 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:30:57 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:30:59 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:30:59 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:30:59 InnoDB: Completed initialization of buffer pool
130301 16:30:59 InnoDB: highest supported file format is Barracuda.
130301 16:30:59 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:30:59 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:31:00 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:31:00 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:31:00 InnoDB: Completed initialization of buffer pool
130301 16:31:00 InnoDB: highest supported file format is Barracuda.
130301 16:31:01 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:31:01 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 16:31:02 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 16:31:02 InnoDB: Initializing buffer pool, size = 16.0M
130301 16:31:02 InnoDB: Completed initialization of buffer pool
130301 16:31:02 InnoDB: highest supported file format is Barracuda.
130301 16:31:02 InnoDB: 1.1.4 started; log sequence number 1595675
130301 16:31:02 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 17:00:46 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 17:00:46 InnoDB: Initializing buffer pool, size = 16.0M
130301 17:00:46 InnoDB: Completed initialization of buffer pool
130301 17:00:46 InnoDB: highest supported file format is Barracuda.
130301 17:00:47 InnoDB: 1.1.4 started; log sequence number 1595675
130301 17:00:47 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 17:07:40 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 17:07:40 InnoDB: Initializing buffer pool, size = 16.0M
130301 17:07:40 InnoDB: Completed initialization of buffer pool
130301 17:07:40 InnoDB: highest supported file format is Barracuda.
130301 17:07:40 InnoDB: 1.1.4 started; log sequence number 1595675
130301 17:07:40 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
130301 17:07:47 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
130301 17:07:47 InnoDB: Initializing buffer pool, size = 16.0M
130301 17:07:47 InnoDB: Completed initialization of buffer pool
130301 17:07:47 InnoDB: highest supported file format is Barracuda.
130301 17:07:47 InnoDB: 1.1.4 started; log sequence number 1595675
130301 17:07:47 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)
是否有配置文件我需要更改以匹配Apache文件?沒有什麼顯而易見的。
非常感謝提前。
端口80問題可能是Skype正在運行(它使用端口80)。對於MySQL我不能幫你,默認端口是3306,運行一個端口掃描器來檢查系統上的開放端口。或者閱讀/xampp/mysql/data/mysql_error.log。或者你可能有另一臺運行mysql的web服務器(檢查你的服務) – x4rf41 2013-03-01 17:38:23
不是Skype,我沒有。將更新問題包括錯誤日誌的文本。 – sanjaypoyzer 2013-03-01 17:49:19
您可以運行netstat -aon,獲取PID並使用該標識查找應用程序。 – 2013-03-01 22:24:58