电脑死机重启后,再开机打开xampp,mysql就无法启动了。
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:\xampp72\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-10-22 9:19:10 0 [Note] InnoDB: File 'D:\xampp72\mysql\data\ibtmp1' 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:\xampp72\mysql\data\ib_buffer_pool
2020-10-22 9:19:10 0 [Note] Server socket created on IP: '::'.
从这上面看不出来到底哪里报错了,没有什么大问题。
进入到xampp下的mysql的bin文件夹,我这边是D:\xampp72\mysql\bin运行mysqld --console。
通过mysqld –console的输出来查看
看到很多类似的错误信息:
尝试解决
经过删除上面的那些看上去像临时文件的尝试(先备份),最后发现,需要删除你的xampp目录mysql/data文件夹里与下图类似命名的文件就可以正常启动mysql了。
我的目录是D:\xampp72\mysql\data,图中打马赛克的是计算机名称。
解决电脑死机导致的xampp无法启动mysql
更多精彩,敬请关注本博微信公众号:hsu1943