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

【已解决】数据库启动失败

发表在 Linux面板2023-8-2 18:26 [复制链接] 5 2703

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:最新
系统版本:CentOS 7.6.1810 x86_64(Py3.7.9)
问题描述:数据库启动失败
相关截图(日志、错误):
2023-02-06 11:24:44 0 [Note] Server socket created on IP: '::'.
2023-02-06 11:24:44 0 [Note] Reading of all Master_info entries succeeded
2023-02-06 11:24:44 0 [Note] Added new Master_info '' to hash table
2023-02-06 11:24:44 0 [Note] /www/server/mysql/bin/mariadbd: ready for connections.
Version: '10.5.6-MariaDB-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
2023-02-06 11:24:49 5 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
2023-02-06 11:24:52 6 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
2023-04-26  3:45:27 30548 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
2023-05-02  5:14:50 31700 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
2023-06-30 22:32:39 42441 [Warning] Aborted connection 42441 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-06-30 22:41:05 42480 [Warning] Aborted connection 42480 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-06-30 23:29:21 42726 [Warning] Aborted connection 42726 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-07-01  0:35:45 42877 [Warning] Aborted connection 42877 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-07-01 20:56:16 43288 [Warning] Aborted connection 43288 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-07-01 21:14:28 43399 [Warning] Aborted connection 43399 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-07-21 13:52:15 51842 [Warning] Aborted connection 51842 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-07-21 14:02:28 51870 [Warning] Aborted connection 51870 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-08-02 15:41:11 55691 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
2023-08-02 16:21:55 0 [Note] /www/server/mysql/bin/mariadbd (initiated by: unknown): Normal shutdown
2023-08-02 16:21:55 0 [Note] InnoDB: FTS optimize thread exiting.
2023-08-02 16:21:55 0 [Note] InnoDB: Starting shutdown...
2023-08-02 16:21:55 0 [Note] InnoDB: Dumping buffer pool(s) to /www/server/data/ib_buffer_pool
2023-08-02 16:21:55 0 [Note] InnoDB: Restricted to 251 pages due to innodb_buf_pool_dump_pct=25
2023-08-02 16:21:55 0 [Note] InnoDB: Buffer pool(s) dump completed at 230802 16:21:55
2023-08-02 16:21:55 0 [Note] InnoDB: Shutdown completed; log sequence number 389127356; transaction id 197815
2023-08-02 16:21:55 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-08-02 16:21:56 0 [Note] /www/server/mysql/bin/mariadbd: Shutdown complete
[root@VM-0-4-centos ~]#

使用道具 举报 只看该作者 回复
发表于 2023-8-2 18:33:36 | 显示全部楼层
本帖最后由 Diiamo 于 2023-8-2 18:36 编辑

[root@VM-0-4-centos ~]# sed -i '/.\/mysql-bin.000004/d' /www/server/data/mysql-bin.index
sed: can't read /www/server/data/mysql-bin.index: No such file or directory
[root@VM-0-4-centos ~]#
123.png
使用道具 举报 回复 支持 反对
发表于 2023-8-2 23:06:01 | 显示全部楼层
您好,这需要根据错误日志分析具体原因,请登录SSH终端,执行下面的命令然后将错误信息完整截图发出来:
  1. cat /www/server/data/*.err|grep -i -C 10 error
复制代码
使用道具 举报 回复 支持 反对
发表于 2023-8-3 10:24:07 | 显示全部楼层
本帖最后由 Diiamo 于 2023-8-3 10:39 编辑
堡塔运维盏尽 发表于 2023-8-2 23:06
您好,这需要根据错误日志分析具体原因,请登录SSH终端,执行下面的命令然后将错误信息完整截图发出来:
...

Last login: Wed Aug  2 18:48:21 2023 from
[root@VM-0-4-centos ~]# cat /www/server/data/*.err|grep -i -C 10 error
2023-02-06 11:24:44 0 [Note] InnoDB: Buffer pool(s) load completed at 230206 11:24:44
2023-02-06 11:24:44 0 [Note] Server socket created on IP: '::'.
2023-02-06 11:24:44 0 [Note] Reading of all Master_info entries succeeded
2023-02-06 11:24:44 0 [Note] Added new Master_info '' to hash table
2023-02-06 11:24:44 0 [Note] /www/server/mysql/bin/mariadbd: ready for connections.
Version: '10.5.6-MariaDB-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
2023-02-06 11:24:49 5 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
2023-02-06 11:24:52 6 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
2023-04-26  3:45:27 30548 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
2023-05-02  5:14:50 31700 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
2023-06-30 22:32:39 42441 [Warning] Aborted connection 42441 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-06-30 22:41:05 42480 [Warning] Aborted connection 42480 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-06-30 23:29:21 42726 [Warning] Aborted connection 42726 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-07-01  0:35:45 42877 [Warning] Aborted connection 42877 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-07-01 20:56:16 43288 [Warning] Aborted connection 43288 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-07-01 21:14:28 43399 [Warning] Aborted connection 43399 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error writing communication packets)
2023-07-21 13:52:15 51842 [Warning] Aborted connection 51842 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-07-21 14:02:28 51870 [Warning] Aborted connection 51870 to db: 'wordpress' user: 'wordpress' host: 'localhost' (Got an error reading communication packets)
2023-08-02 15:41:11 55691 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
2023-08-02 16:21:55 0 [Note] /www/server/mysql/bin/mariadbd (initiated by: unknown): Normal shutdown
2023-08-02 16:21:55 0 [Note] InnoDB: FTS optimize thread exiting.
2023-08-02 16:21:55 0 [Note] InnoDB: Starting shutdown...
2023-08-02 16:21:55 0 [Note] InnoDB: Dumping buffer pool(s) to /www/server/data/ib_buffer_pool
2023-08-02 16:21:55 0 [Note] InnoDB: Restricted to 251 pages due to innodb_buf_pool_dump_pct=25
2023-08-02 16:21:55 0 [Note] InnoDB: Buffer pool(s) dump completed at 230802 16:21:55
2023-08-02 16:21:55 0 [Note] InnoDB: Shutdown completed; log sequence number 389127356; transaction id 197815
2023-08-02 16:21:55 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-08-02 16:21:56 0 [Note] /www/server/mysql/bin/mariadbd: Shutdown complete
[root@VM-0-4-centos ~]#
使用道具 举报 回复 支持 反对
发表于 2023-8-3 16:49:37 | 显示全部楼层
堡塔运维盏尽 发表于 2023-8-2 23:06
您好,这需要根据错误日志分析具体原因,请登录SSH终端,执行下面的命令然后将错误信息完整截图发出来:
...

上面是完整错误日志,现在怎么处理? 我关闭二进制日志,然后重启就提示重启失败,没做其它操作。
使用道具 举报 回复 支持 反对
发表于 2023-8-8 12:03:26 | 显示全部楼层
堡塔运维盏尽 发表于 2023-8-2 23:06
您好,这需要根据错误日志分析具体原因,请登录SSH终端,执行下面的命令然后将错误信息完整截图发出来:
...

我按一样的配置新建一个服务器,把新服务器数据库的配置复制到问题数据库,保存后顺利启动。我发现你们的数据库非常容易出问题,关闭二进制日志或者修改参数后,重启时可能出错。
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

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

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

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

点击联系技术免费分析

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

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