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


    问题描述

    在尝试启动mysql-8.1.0-winx64服务时遇到了启动失败的问题,具体的错误提示如下:

    net start mysql
    
    MySQL 服务正在启动 .
    MySQL 服务无法启动。
    
    服务没有报告任何错误。
    
    请键入 NET HELPMSG 3534 以获得更多的帮助。
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    原因分析

    尝试通过命令行启动MySQL服务并查看控制台输出,得到了以下错误信息:

    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.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    从错误信息 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服务。

    # 删除binlog文件
    del /Q D:\Development\MySQL\mysql-8.1.0-winx64\data\binlog.*
    # 重新启动mysql
    net start mysql
    
    • 1
    • 2
    • 3
    • 4

    成功启动mysql服务后,我们可以再次尝试登录到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.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14

    经过以上操作,我们已经成功解决了mysql-8.1.0-winx64服务无法启动的问题,并且成功登录到了MySQL数据库。

  • 相关阅读:
    【Docker】Linux下Docker 部署一个SpringBoot项目的完整流程(通俗易懂,简单上手!!)
    MindFusion.Diagramming for ASP.NET MVC 4.2 Crack
    今抖云创—短视频需要的那些自媒体工具
    程序员就该这样解读《隐秘的角落》
    win10上修改docker的镜像文件存储位置
    JAVA JVM 是怎么判定对象已经“死去”?
    java计算机毕业设计线上医药用品分销系统设计与实现源码+系统+mysql数据库+lw文档+部署
    ESP8266-Arduino编程实例-AM2320温度湿度传感器驱动
    [element-ui] 对el-tree的某个节点进行禁用
    PHP免登录积分商城系统/动力商城/积分商城兑换系统源码Tinkphp
  • 原文地址:https://blog.csdn.net/qq_34988204/article/details/132690822