【问题标题】:XAMPP Apache & MySQL Server won't startXAMPP Apache & MySQL 服务器无法启动
【发布时间】:2016-04-19 12:46:13
【问题描述】:

a我有两个服务都无法启动的问题。在两者上,我都会收到消息

Error: MySQL shutdown unexpectedly.(与apache相同)。

我已经把apache服务器的端口从80改成了8080,443改成了4433,还让别人去查,也没用。

我在这里的类似帖子上尝试了一些解决方案,例如删除 mysql 文件夹中的 ibdata1 文件,但这些似乎都不起作用。我什至不认为这些可以解决它,因为这两个服务都受到了影响。

我的另一个想法是我在电脑上没有足够的权限来运行这些服务,但我以管理员身份登录,并且我还运行了一个 postgres 服务,我可以停止并重新启动它。

我使用的是 Windows 10,但之前运行过 XAMPP。

日志文件:Apache

[Wed Jan 13 09:33:31.539128 2016] [core:warn] [pid 5664:tid 572] AH00098: pid file D:/Data/Xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jan 13 09:33:32.039157 2016] [mpm_winnt:notice] [pid 5664:tid 572] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8 configured -- resuming normal operations
[Wed Jan 13 09:33:32.039157 2016] [mpm_winnt:notice] [pid 5664:tid 572] AH00456: Apache Lounge VC11 Server built: Jan 28 2015 16:48:40
[Wed Jan 13 09:33:32.039157 2016] [core:notice] [pid 5664:tid 572] AH00094: Command line: 'd:\\data\\xampp\\apache\\bin\\httpd.exe -d D:/Data/Xampp/apache'
[Wed Jan 13 09:33:32.039157 2016] [mpm_winnt:notice] [pid 5664:tid 572] AH00418: Parent: Created child process 4376
[Wed Jan 13 09:33:32.523560 2016] [mpm_winnt:notice] [pid 4376:tid 556] AH00354: Child: Starting 150 worker threads.

日志文件:MySQL

2016-01-13 09:33:33 5760 [Note] Plugin 'FEDERATED' is disabled.
2016-01-13 09:33:33 af8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-01-13 09:33:33 5760 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-01-13 09:33:33 5760 [Note] InnoDB: The InnoDB memory heap is disabled
2016-01-13 09:33:33 5760 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-01-13 09:33:33 5760 [Note] InnoDB: Memory barrier is not used
2016-01-13 09:33:33 5760 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-01-13 09:33:33 5760 [Note] InnoDB: Not using CPU crc32 instructions
2016-01-13 09:33:33 5760 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-01-13 09:33:33 5760 [Note] InnoDB: Completed initialization of buffer pool
2016-01-13 09:33:33 5760 [Note] InnoDB: Highest supported file format is Barracuda.
2016-01-13 09:33:33 5760 [Note] InnoDB: The log sequence numbers 1665234 and 1665234 in ibdata files do not match the log sequence number 61260762 in the ib_logfiles!
2016-01-13 09:33:33 5760 [Note] InnoDB: Database was not shutdown normally!
2016-01-13 09:33:33 5760 [Note] InnoDB: Starting crash recovery.
2016-01-13 09:33:33 5760 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-01-13 09:33:33 5760 [Note] InnoDB: Restoring possible half-written data pages 
2016-01-13 09:33:33 5760 [Note] InnoDB: from the doublewrite buffer...
2016-01-13 09:33:34 5760 [Note] InnoDB: 128 rollback segment(s) are active.
2016-01-13 09:33:34 5760 [Note] InnoDB: Waiting for purge to start
2016-01-13 09:33:34 5760 [Note] InnoDB: 5.6.24 started; log sequence number 61260762
2016-01-13 09:33:34 5760 [Note] Server hostname (bind-address): '*'; port: 3306
2016-01-13 09:33:34 5760 [Note] IPv6 is available.
2016-01-13 09:33:34 5760 [Note]   - '::' resolves to '::';
2016-01-13 09:33:34 5760 [Note] Server socket created on IP: '::'.

如果我选择 xampp-start.exe,我会在 cmd 窗口中收到此消息:

2016-01-14 10:30:28 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2016-01-14 10:30:28 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-01-14 10:30:28 0 [Note] mysql\bin\mysqld.exe (mysqld 5.6.24) starting as process 1800 ...
2016-01-14 10:30:28 1800 [ERROR] Can't find messagefile 'D:\Data\Xampp\mysql\share\errmsg.sys'
2016-01-14 10:30:28 1800 [Warning] Can't create test file D:\Data\Xampp\mysql\data\DESKTOP-0E1SMUM.lower-test
2016-01-14 10:30:28 1800 [Warning] Can't create test file D:\Data\Xampp\mysql\data\DESKTOP-0E1SMUM.lower-test
mysql\bin\mysqld.exe: Can't change dir to 'D:\Data\Xampp\mysql\data\' (Errcode: 13 - Permission denied)
2016-01-14 10:30:28 1800 [ERROR] Aborting

2016-01-14 10:30:28 1800 [Note] Binlog end
2016-01-14 10:30:28 1800 [Note]
httpd.exe: Syntax error on line 37 of E:/Data/Xampp/apache/conf/httpd.conf: ServerRoot must be a valid directory

虽然文件 errmsg.sys 存在。

【问题讨论】:

  • 在 Windows 事件查看器中查看来自 Apache 和 MYSQL 的消息。他们在打开他们各自的错误日志之前写在那里。
  • 这些日志不包括完整的启动。确保从上次启动的终止到日志中的最后一行
  • @RiggsFolly 是整个错误日志,没有更多了。如果我重现错误,则没有添加新行
  • 这个问题好运吗?想知道你是如何解决它的

标签: mysql apache service xampp


【解决方案1】:

我找到了另一个适合我的解决方案! 如果有人遇到这个问题,请尝试通过位于 xampp 目录中的批处理文件“apache_start”启动 apache。这给了我错误:

ServerRoot must be a valid directory

这又可以通过运行位于同一目录中的“setup_xampp”批处理文件来解决。完成后,apache & mysql 又开始运行了。

【讨论】:

    猜你喜欢
    • 2015-07-03
    • 2018-06-18
    • 2021-03-11
    • 2016-01-08
    • 2016-03-22
    • 2021-01-24
    • 1970-01-01
    • 2021-07-21
    • 2014-11-21
    相关资源
    最近更新 更多