解决电脑死机导致的xampp无法启动mysql

电脑死机重启后,再开机打开xamppmysql就无法启动了。

xampp上的错误日志

09:41:15  [mysql]   Error: MySQL shutdown unexpectedly.
09:41:15  [mysql]   This may be due to a blocked port, missing dependencies, 
09:41:15  [mysql]   improper privileges, a crash, or a shutdown by another method.
09:41:15  [mysql]   Press the Logs button to view error logs and check
09:41:15  [mysql]   the Windows Event Viewer for more clues
09:41:15  [mysql]   If you need more help, copy and post this
09:41:15  [mysql]   entire log window on the forums

大概意思是mysql启动失败,提示可能是端口被占用,缺少依赖,权限问题,电脑死机或者其他任何导致关机都可能是原因,等于啥都没说,端口确认是没有占用的,我这个情况显然是因为之前的电脑死机导致的。

提示查看错误日志。下面查看mysql的启动错误日志。

mysql启动日志

2020-10-22  9:19:09 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-10-22  9:19:09 0 [Note] InnoDB: Uses event mutexes
2020-10-22  9:19:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-10-22  9:19:09 0 [Note] InnoDB: Number of pools: 1
2020-10-22  9:19:09 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-10-22  9:19:09 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-10-22  9:19:09 0 [Note] InnoDB: Completed initialization of buffer pool
2020-10-22  9:19:10 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-10-22  9:19:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-10-22  9:19:10 0 [Note] InnoDB: Setting file 'D:xampp72mysqldataibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-10-22  9:19:10 0 [Note] InnoDB: File 'D:xampp72mysqldataibtmp1' size is now 12 MB.
2020-10-22  9:19:10 0 [Note] InnoDB: Waiting for purge to start
2020-10-22  9:19:10 0 [Note] InnoDB: 10.4.11 started; log sequence number 18007704893; transaction id 1827990
2020-10-22  9:19:10 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-10-22  9:19:10 0 [Note] InnoDB: Loading buffer pool(s) from D:xampp72mysqldataib_buffer_pool
2020-10-22  9:19:10 0 [Note] Server socket created on IP: '::'.

从这上面看不出来到底哪里报错了,没有什么大问题。

进入到xampp下的mysqlbin文件夹,我这边是D:xampp72mysqlbin运行mysqld --console

通过mysqld –console的输出来查看

看到很多类似的错误信息:

mysqld --console错误消息

尝试解决

首先备份一下 mysql/data 文件夹(这里面包含所有的数据库和记录等等)到mysql/data_old

经过各种尝试,包括修改my.iniinnodb_force_recovery配置,无效。

最后的解决办法,,然后从data/backup中复制multi-master.info文件到mysql/data,重新启动mysql成功了。

如果这个办法不能解决你的清空,可以尝试将data/backup里的文件全部复制到mysql/data覆盖,然后从备份文件夹mysql/data_old中复制ibdata1文件和数据库同名文件夹到mysql/data,试试看是不是可以启动mysql了。

解决电脑死机导致的xampp无法启动mysql

原文链接:https://beltxman.com/3257.html,若无特殊说明本站内容为 行星带 原创,未经同意禁止转载。

Scroll to top