当前位置:论坛首页 > Linux面板 > 求助

【已解答】宝塔面板MySQL无法启动

发表在 Linux面板4 天前 [复制链接] 1 23

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:

CentOS 7.8.2003 x86_64(Py3.7.9) Linux面板11.6.0
系统版本:

CentOS 7.8.2003 x86_64(Py3.7.9)
问题描述:

今天误删除一些文件,导致无法连接。
相关截图(日志、错误):

[root@iZuf64la2roenpunao7i0yZ ~]# wget -O sql-repair.sh http://download.bt.cn/install/sql-repair.sh && sh sql-repair.sh
--2026-04-03 22:21:10--  http://download.bt.cn/install/sql-repair.sh
Resolving download.bt.cn (download.bt.cn)... 36.150.27.13, 2409:8c20:28c1:4::2
Connecting to download.bt.cn (download.bt.cn)|36.150.27.13|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 498 [application/octet-stream]
Saving to: ‘sql-repair.sh’

100%[=============================================================================================>] 498         --.-K/s   in 0s      

2026-04-03 22:21:10 (88.5 MB/s) - ‘sql-repair.sh’ saved [498/498]

==========================================================================================
2026-04-03T13:01:41.737815Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:01:41.737905Z 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.
2026-04-03T13:01:41.738013Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 3102
2026-04-03T13:01:41.751925Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:01:42.030935Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:01:42.149987Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:01:42.208519Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:01:42.208741Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:01:42.209059Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:01:43.675691Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:03.115897Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:03.115988Z 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.
2026-04-03T13:06:03.116105Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 4012
2026-04-03T13:06:03.128640Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:03.455978Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:03.599662Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:03.664406Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:03.664717Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:03.665180Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:05.128897Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:06.187513Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:06.187627Z 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.
2026-04-03T13:06:06.187740Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 4690
2026-04-03T13:06:06.200273Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:06.524110Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:06.662241Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:06.733759Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:06.733974Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:06.734309Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:08.184307Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:09.708756Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:09.708845Z 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.
2026-04-03T13:06:09.708953Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 5360
2026-04-03T13:06:09.721574Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:10.028250Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:10.166143Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:10.224009Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:10.224244Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:10.224557Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:11.696552Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:13.297471Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:13.297562Z 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.
2026-04-03T13:06:13.297691Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 6029
2026-04-03T13:06:13.310501Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:13.623046Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:13.740992Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:13.799791Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:13.800047Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:13.800412Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:15.269045Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:16.817702Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:16.817793Z 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.
2026-04-03T13:06:16.817901Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 6699
2026-04-03T13:06:16.830782Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:17.116877Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:17.245245Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:17.310763Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:17.310987Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:17.311296Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:18.770453Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:20.409226Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:20.409315Z 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.
2026-04-03T13:06:20.409421Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 7368
2026-04-03T13:06:20.422154Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:20.729849Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:20.849503Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:20.909783Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:20.909975Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:20.910259Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:22.372499Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:23.947825Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:23.947917Z 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.
2026-04-03T13:06:23.948027Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 8038
2026-04-03T13:06:23.960708Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:24.329029Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:24.447452Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:24.505723Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:24.505998Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:24.506411Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:25.977694Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
2026-04-03T13:06:27.498254Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2026-04-03T13:06:27.498360Z 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.
2026-04-03T13:06:27.498478Z 0 [System] [MY-010116] [Server] /www/server/mysql/bin/mysqld (mysqld 8.0.24) starting as process 8713
2026-04-03T13:06:27.511191Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-04-03T13:06:27.825972Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-04-03T13:06:27.944361Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
mysqld: File './mysql-bin.000196' not found (OS errno 2 - No such file or directory)
2026-04-03T13:06:28.001946Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2026-04-03T13:06:28.002177Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2026-04-03T13:06:28.002449Z 0 [ERROR] [MY-010119] [Server] Aborting
2026-04-03T13:06:29.472512Z 0 [System] [MY-010910] [Server] /www/server/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.24)  Source distribution.
/www/server/data
==========================================================================================
请将以上错误信息截图发至论坛寻求帮助
使用道具 举报 只看该作者 回复
发表于 昨天 17:22 | 显示全部楼层
您好,请问您在此之前是否删除过mysql-bin.000196 这个文件?
如果能在回收站中还原的话,请还原这个文件,
如果找不到,请做完快照后(不做快照数据丢失和宝塔无关)
找到
/www/server/data/mysql-bin.index 这个文件,把里面记录到的mysql-bin.000196以及您当前/www/server/data目录下没有的二进制日志记录删掉后,重启MySQL
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表