XAMPP设置-MySQL无法正常工作 [英] XAMPP setup - MySQL not working

查看:118
本文介绍了XAMPP设置-MySQL无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图让XAMPP在Win7/64上运行以测试Wordpress主题.

I'm trying to get XAMPP working on Win7/64 for testing Wordpress themes.

我最初在尝试访问Apache时遇到问题 端口80,但被告知将配置文件更改为端口81(已完成),现在Apache正在运行,并且localhost:81可以很好地显示XAMPP控制面板.

I was originally getting a problem with Apache trying to access Port 80 but I was told to change the config file to port 81 which I have done and now Apache is running and localhost:81 shows the XAMPP control panel fine.

但是,现在MySQL根本无法工作.在更改配置文件之前,我认为是的,但是Apache没有运行,因此我仍然根本无法访问localhost.

However, now MySQL is not working at all. Before I changed the config file, I think it was, but Apache was not running so I still couldn't access localhost at all.

在Windows事件查看器中,我在MySQL上收到此错误报告:

In Windows Event Viewer, I am getting this Error report on the MySQL:

Fatal error: Can't open and lock privilege tables: Can't find file: 'host' (errno: 2)

在XAMPP的控制台中,我当前正在获取此信息:

In XAMPP's console I am currently getting this:

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的错误日志:

and here is the error log for 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文件?我看不到任何明显的东西.

Is there a config file I need to change to match the Apache file? There's nothing obvious I can see.

非常感谢.

推荐答案

最终解决了该问题,方法是卸载XAMPP,然后重新安装它,然后将Apache使用的端口从80更改为8080.

Ended up solving the problem by uninstalling XAMPP, reinstalling it again and then changing the port that Apache uses from 80 to 8080.

这篇关于XAMPP设置-MySQL无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆