宝塔51特惠活动,企业版1099元/年,送SSL证书,最高立减2万元!查看活动
当前位置:论坛首页 > Linux面板 > 求助

【待反馈】数据库连接失败,请检查数据库服务是否启动

发表在 Linux面板2023-8-28 09:25 [复制链接] 5 1635

本帖最后由 宝塔用户_fohxfc 于 2023-8-29 01:07 编辑

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:[url=]8.0.2[/url]
系统版本:CentOS 7.4.1708 x86_64(Py3.7.9)
问题描述:安装了WordPress,每天早上打开网站就报数据库连接出错,打开数据库提示连接失败未启动,重启服务器和面板后又恢复了
相关截图(日志、错误): 微信截图_20230828092027.png 微信截图_20230828092614.png 微信截图_20230828092604.png

使用道具 举报 只看该作者 回复
发表于 2023-8-28 10:23:11 | 显示全部楼层
您好,根据这种提示,通常是mysql服务停止运行了,您可以通过相关的错误日志来进行排查一下您的mysql服务是什么原因导致的停止运行。
也可以使用下述命令来进行查询带error的日志
  1. cat /www/server/data/*.err|grep -i -C 10 error
复制代码
使用道具 举报 回复 支持 反对
发表于 2023-8-28 11:53:38 | 显示全部楼层
堡塔运维香菜卷 发表于 2023-8-28 10:23
您好,根据这种提示,通常是mysql服务停止运行了,您可以通过相关的错误日志来进行排查一下您的mysql服务是 ...

2023-08-04T14:42:33.889254Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-04T14:42:33.989623Z 0 [Warning] '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.
2023-08-04T14:42:33.989632Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-04T14:45:09.475716Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-04T14:47:31.108996Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-04T14:47:31.109105Z 0 [Warning] '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.
2023-08-04T14:47:31.109109Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-04T14:47:37.298555Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-04T14:48:49.040386Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-04T14:48:49.441918Z 0 [Warning] '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.
2023-08-04T14:48:49.441939Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-04T14:48:58.790776Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-04T14:50:24.962864Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-04T14:50:25.014949Z 0 [Warning] '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.
2023-08-04T14:50:25.014956Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-04T14:50:34.157871Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-04T14:51:48.027741Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-04T14:51:48.071111Z 0 [Warning] '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.
2023-08-04T14:51:48.071138Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-04T14:52:03.663482Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-06T05:27:00.913006Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-06T05:27:00.957391Z 0 [Warning] '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.
2023-08-06T05:27:00.957398Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-06T05:27:14.290698Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-06T05:28:49.404210Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-06T05:28:51.754558Z 0 [Warning] '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.
2023-08-06T05:28:51.977450Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-06T05:29:24.315870Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-07T19:30:50.199222Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-07T19:30:50.815987Z 0 [Warning] '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.
2023-08-07T19:30:50.816012Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-07T19:30:57.291882Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-09T11:34:50.074587Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-09T11:34:51.086951Z 0 [Warning] '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.
2023-08-09T11:34:51.105869Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-09T11:35:01.961013Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-09T11:36:22.461507Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-09T11:36:22.461620Z 0 [Warning] '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.
2023-08-09T11:36:22.461624Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-09T11:36:32.476845Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-09T11:37:15.202150Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-09T11:37:15.202290Z 0 [Warning] '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.
2023-08-09T11:37:15.202294Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-09T11:37:17.107156Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-09T11:39:11.739488Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-09T11:39:11.887338Z 0 [Warning] '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.
2023-08-09T11:39:11.887368Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-09T11:39:33.043871Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-15T08:59:30.328486Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-15T08:59:30.328610Z 0 [Warning] '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.
2023-08-15T08:59:30.328616Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-15T08:59:33.290290Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-16T02:11:40.108878Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-16T02:11:40.123808Z 0 [Warning] '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.
2023-08-16T02:11:40.123817Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-16T02:11:40.962473Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-21T11:12:56.023654Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-21T11:12:56.023778Z 0 [Warning] '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.
2023-08-21T11:12:56.023782Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-21T11:13:43.107679Z 0 [Warning] CA certificate ca.pem is self signed.
2023-08-25T10:33:35.282068Z 0 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
2023-08-25T10:33:35.282176Z 0 [Warning] '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.
2023-08-25T10:33:35.282180Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-08-25T10:33:35.919380Z 0 [Warning] CA certificate ca.pem is self signed.
使用道具 举报 回复 支持 反对
发表于 2023-8-28 15:26:13 | 显示全部楼层
堡塔运维香菜卷 发表于 2023-8-28 10:23
您好,根据这种提示,通常是mysql服务停止运行了,您可以通过相关的错误日志来进行排查一下您的mysql服务是 ...

报错的信息麻烦看一下
使用道具 举报 回复 支持 反对
发表于 2023-8-29 22:19:33 | 显示全部楼层
现在是每天0点自动数据库断开,重启服务器恢复
使用道具 举报 回复 支持 反对
发表于 2024-3-13 12:05:21 | 显示全部楼层
问题解决了吗楼主
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

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

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

紧急运维服务

响应时间:3分钟

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

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

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

点击联系技术免费分析
快速回复 返回顶部 返回列表