【MySQL】MySQL 服务无法启动。服务没有报告任何错误。请键入 NET HELPMSG 3534 以获得更多的帮助。

问题描述

mysql-8.1.0-winx64服务无法启动。

net start mysql

MySQL 服务正在启动 .
MySQL 服务无法启动。

服务没有报告任何错误。

请键入 NET HELPMSG 3534 以获得更多的帮助。

原因分析

mysqld --console

2023-09-05T06:01:40.543259Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2023-09-05T06:01:40.732632Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2023-09-05T06:01:40.732664Z 0 [System] [MY-010116] [Server] D:\Development\MySQL\mysql-8.1.0-winx64\bin\mysqld.exe (mysqld 8.1.0) starting as process 27656
2023-09-05T06:01:40.759703Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-09-05T06:01:41.303717Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: File '.\binlog.000062' not found (OS errno 2 - No such file or directory)
2023-09-05T06:01:41.586006Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2023-09-05T06:01:41.586072Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2023-09-05T06:01:41.586133Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-09-05T06:01:42.789981Z 0 [System] [MY-010910] [Server] D:\Development\MySQL\mysql-8.1.0-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.1.0)  MySQL Community Server - GPL.
2023-09-05T06:01:42.790917Z 0 [System] [MY-015016] [Server] MySQL Server - end.

由 mysqld: File ‘.\binlog.000062’ not found (OS errno 2 - No such file or directory) 可以得知 mysql-8.1.0-winx64\data 目录下 binlog.000062 文件缺失。


解决方案

删除mysql-8.1.0-winx64\data目录下所有binlog开头的文件,重新启动mysql,启动成功。

mysql -u root -p

Enter password: ****
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.1.0 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

你可能感兴趣的:(MySQL,mysql,数据库)