完美解决,不用重装:MySQL启动失败提示:本地计算机上的Mysql服务启动后停止

今天在重启电脑之后发现我本地的mysql8.0启动一直失败,看了看网上的教程发现都需要重装MySQL,还得清除data,这不完犊子吗,经过摸索并观察启动失败的日志,日志地址为数据库data文件夹下err后缀:
报错如下
2020-09-14T01:17:29.493781Z 0 [System] [MY-010116] [Server] C:\Users\23371\Desktop\crsc-3799\mysql-8.0.21-winx64\bin\mysqld (mysqld 8.0.21) starting as process 11840 2020-09-14T01:17:29.511824Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2020-09-14T01:17:29.871402Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2020-09-14T01:17:30.252354Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060 mysqld: File '.\binlog.000032' not found (OS errno 2 - No such file or directory) 2020-09-14T01:17:30.282073Z 0 [ERROR] [MY-010958] [Server] Could not open log file. 2020-09-14T01:17:30.282710Z 0 [ERROR] [MY-010041] [Server] Can't init tc log 2020-09-14T01:17:30.283444Z 0 [ERROR] [MY-010119] [Server] Aborting 2020-09-14T01:17:31.301525Z 0 [System] [MY-010910] [Server] C:\Users\23371\Desktop\crsc-3799\mysql-8.0.21-winx64\bin\mysqld: Shutdown complete (mysqld 8.0.21) MySQL Community Server - GPL.
注意看中间提示mysqld: File ‘.\binlog.000032’ not found
看你的data文件夹,果然没有32,尝试复制一个31文件,改后缀为32

改完之后如下图:
尝试重启MySQL服务

完成!
这种解决办法没有像网上别的办法那样重新安装数据库,没必要浪费时间浪费力气,这个报错这样解决很完美了嘻嘻!以后出错要先学会看日志文件

本文地址:https://blog.csdn.net/weixin_42029241/article/details/108572671

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐