【问题标题】:MySQL shutdown unexpectedly in XAMPP while apache workingMySQL 在 XAMPP 中意外关闭,而 apache 工作
【发布时间】:2020-05-05 06:32:24
【问题描述】:

当我单击开始按钮时,此消息显示在我的 XAMPP 控制面板中。
此警告显示 MySQL 意外关闭,但 Apache 服务器运行正常。

11:29:21 AM  [main]     Starting Check-Timer
11:29:21 AM  [main]     Control Panel Ready
11:29:28 AM  [main]     Executing "c:\xampp\mysql"
11:29:50 AM  [mysql]    Attempting to start MySQL app...
11:29:51 AM  [mysql]    Status change detected: running
11:30:00 AM  [mysql]    Status change detected: stopped
11:30:00 AM  [mysql]    Error: MySQL shutdown unexpectedly.
11:30:00 AM  [mysql]    This may be due to a blocked port, missing dependencies, 
11:30:00 AM  [mysql]    improper privileges, a crash, or a shutdown by another method.
11:30:00 AM  [mysql]    Press the Logs button to view error logs and check
11:30:00 AM  [mysql]    the Windows Event Viewer for more clues
11:30:00 AM  [mysql]    If you need more help, copy and post this
11:30:00 AM  [mysql]    entire log window on the forums

这是 MySQL 错误日志:

2020-05-05 11:29:51 0 [Note] InnoDB: using atomic writes.
2020-05-05 11:29:51 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-05-05 11:29:51 0 [Note] InnoDB: Uses event mutexes
2020-05-05 11:29:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-05-05 11:29:51 0 [Note] InnoDB: Number of pools: 1
2020-05-05 11:29:51 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-05-05 11:29:51 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-05-05 11:29:51 0 [Note] InnoDB: Completed initialization of buffer pool
2020-05-05 11:29:51 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-05-05 11:29:51 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-05-05 11:29:51 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-05-05 11:29:51 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-05-05 11:29:51 0 [Note] InnoDB: Waiting for purge to start
2020-05-05 11:29:51 0 [Note] InnoDB: 10.4.8 started; log sequence number 113908; transaction id 9
2020-05-05 11:29:51 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-05-05 11:29:51 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-05-05 11:29:51 0 [Note] InnoDB: Buffer pool(s) load completed at 200505 11:29:51
2020-05-05 11:29:51 0 [Note] Server socket created on IP: '::'.

我尝试了在 StackOverflow 上找到的大部分内容,但没有成功。
谁能帮我找到解决办法?

【问题讨论】:

    标签: mysql xampp shutdown


    【解决方案1】:

    这个方法解决了我的问题

    步骤 1. 将文件夹 c:\xampp\mysql\data 重命名为 c:\xampp\mysql\data_old(可以使用任何名称)。

    步骤 2. 创建一个新文件夹 c:\xampp\mysql/data。

    步骤 3. 将 mysql\backup 中的内容复制到新的 mysql\data 文件夹中。

    步骤 4. 将 mysql\data_old 中的所有数据库文件夹复制到 mysql\data(跳过 data_old 中的 mysql、performance_schema 和 phpmyadmin 文件夹)。

    步骤 5. 最后从 mysql\data_old 复制 ibdata1 文件并将其替换到 mysql\data 文件夹中。

    步骤 6. 从 XAMPP 控制面板启动 MySQL。

    而且,它完成了。没有数据库丢失,没有端口改变,没有以管理员身份运行,没有强制恢复,没有杀死 mysqld 进程,没有从以前的版本恢复,没有更多的错误。

    更多信息请查看blog post

    【讨论】:

      【解决方案2】:

      在网上搜索了近一个小时后,我发现这很有帮助。 您可以通过solution screenshotted here或浏览XAMPP forum here

      【讨论】:

      • 天哪,今天这救了我的命,谢谢!
      猜你喜欢
      • 1970-01-01
      • 2015-06-21
      • 2021-10-04
      • 2015-06-10
      • 2019-08-12
      • 2020-03-28
      相关资源
      最近更新 更多