已解决Starting MySQL...The server quit without updating PID file [FAILED]ata/ecs-fe0e-0002.pid).

博客内容讲述了在华为云环境中,由于日志文件被删除导致MySQL无法启动的问题。错误信息显示缺少'./mysql-bin.000024'文件,并给出了两条可能的解决方案:修改my.cnf配置文件中的log_bin参数,或者删除mysql-bin.index中对应的日志文件。通过应用这些方法,成功解决了服务启动问题。
摘要由CSDN通过智能技术生成

问题描述: 环境是华为云,领导说项目占的磁盘太大了,删了日志,就起不来了,让我来看看。而且数据库里面信息比较重要,不能搞没了。

百度了很多教程都没有什么用,然后查看了下启动Mysql的时候后台报错,如果你的后台报错和我的相似可以尝试以下的两种办法,如果不是就不要再试了,mysql报错太笼统了.

文件:ecs-fe0e-0002.err 我的路径/data/data
mysqld: File './mysql-bin.000024' not found (OS errno 2 - No such file or directory)
2021-12-14T03:14:27.285933Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-12-14T03:14:27.285975Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2021-12-14T03:14:27.286036Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.17) starting as process 13813
2021-12-14T03:14:27.653397Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2021-12-14T03:14:27.653409Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2021-12-14T03:14:27.653589Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-12-14T03:14:28.828141Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.17)  Source distribution.

google搜索了下

第一种办法: 修改my.cnf,修改log_bin=ON指标

第二种方法: 删除mysql-bin.index里的mysql-bin.000024,mysql-bin.index文件可能要根据情况而定,我看的那篇文章是binlog.index这个文件,它位于您安装是设置的/data路径

修改完service mysql start 可以正常启动

鸣谢:mysql - File './binlog.000007' not found (OS errno 2 - No such file or directory) - Stack Overflow

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值