Xampp MySQL错误:MySQL意外关闭

5
当我启动mysql时,出现以下错误:
17:43:13  [mysql]   Error: MySQL shutdown unexpectedly.
17:43:13  [mysql]   This may be due to a blocked port, missing dependencies, 
17:43:13  [mysql]   improper privileges, a crash, or a shutdown by another method.
17:43:13  [mysql]   Press the Logs button to view error logs and check
17:43:13  [mysql]   the Windows Event Viewer for more clues
17:43:13  [mysql]   If you need more help, copy and post this
17:43:13  [mysql]   entire log window on the forums

然后,我检查了mysql_error.log文件:

    2017-05-03 17:39:39 202c 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.
    170503 17:39:39 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    170503 17:39:39 [Note] InnoDB: The InnoDB memory heap is disabled
    170503 17:39:39 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    170503 17:39:39 [Note] InnoDB: Memory barrier is not used
    170503 17:39:39 [Note] InnoDB: Compressed tables use zlib 1.2.3
    170503 17:39:39 [Note] InnoDB: Not using CPU crc32 instructions
    170503 17:39:39 [Note] InnoDB: Initializing buffer pool, size = 16.0M
    170503 17:39:39 [Note] InnoDB: Completed initialization of buffer pool
    170503 17:39:39 [Note] InnoDB: Highest supported file format is Barracuda.
    170503 17:39:39 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600674 in         the ib_logfiles!
    170503 17:39:39 [Note] InnoDB: Database was not shutdown normally!
    170503 17:39:39 [Note] InnoDB: Starting crash recovery.
    170503 17:39:39 [Note] InnoDB: Reading tablespace information from the .ibd files...
    170503 17:39:39 [Note] InnoDB: Restoring possible half-written data pages 
    170503 17:39:39 [Note] InnoDB: from the doublewrite buffer...
    170503 17:39:39 [Note] InnoDB: 128 rollback segment(s) are active.
    170503 17:39:39 [Note] InnoDB: Waiting for purge to start
    170503 17:39:40 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.22-72.0 started; log sequence number 1600674
    170503 17:39:40 [Note] Plugin 'FEEDBACK' is disabled.
    170503 17:39:40 [Note] Server socket created on IP: '::'.   

最终,我将xampp/mysql/backup文件夹移动到xampp/mysql/data文件夹中,并重新运行mysql。然后,它就可以正常工作了!但我不知道为什么会出现这个问题。希望有人能解答我的疑问!
4个回答

6

我在Google上搜索并尝试了改变端口、删除文件、重新安装xampp、将备份文件复制粘贴到mysql/data文件夹中等一切方法,但都没有效果。

我找到了解决这个问题的最佳方案。

解决方案:

  1. 转到xampp/mysql/data并备份此文件夹
  2. 删除下图所选文件 enter image description here
  3. 从xampp/mysql/backup中复制下图所选文件,并将其粘贴到xampp/mysql/data文件夹中 enter image description here
  4. 现在重新启动xampp服务器,它将像以前一样运行,不需要删除数据库或重新安装xampp服务器。

它会删除所有数据库。千万不要这样做。 - Shiva

2
如果您没有以管理员身份运行XAMPP,则关闭MySQL可能会导致损坏,这意味着您必须修复或删除表。通过以管理员身份运行XAMPP,可以轻松避免这种情况。

也许你是对的,问题确实出在这个表上。谢谢你的回答! - Cindy

0

这对我有用。

在XAMPP控制面板上打开服务 查找服务> MySQL80, 右键单击此服务,然后单击停止 返回XAMPP控制面板并启动MySQL

感谢@Shahjahan


你的回答可以通过提供更多支持信息来改进。请[编辑]以添加进一步的细节,例如引用或文档,以便他人可以确认你的答案是正确的。您可以在帮助中心中找到有关如何编写良好答案的更多信息。 - Community

0
  • 打开 XAMPP 控制面板 上的 服务
  • 查找 MySQL80 服务,右键单击此服务并单击 停止
  • 返回 XAMPP 控制面板 并启动 MySQL

MySQL80在服务中不可用。我应该在哪里找到它? - Shiva

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接