排查ubuntu系统的MySQL自动关闭问题

丹柯yx

关注

阅读 12

2024-02-02


问题:1月31号,2月1号MySQL无故自动关闭

排查思路:先看MySQL的错误日志,查看有没有可疑的操作问题,看到系统发出的关闭状态,其他用户没关闭操作命令

tail -1000 /var/log/mysql/error.log.1

排查ubuntu系统的MySQL自动关闭问题_mysql自动关闭解决方法

看到有系统发出关闭的状态

然后看看系统日志dmesg,也没有系统压力导致的kill mysql操作

最后查看/var/log/syslog,发现了以下日志

排查ubuntu系统的MySQL自动关闭问题_MySQL_02

发现了是Ubuntu的系统组件自动更新导致的

解决方法:

apt-get remove unattended-upgrades

systemctl stop apt-daily.timer

systemctl disable apt-daily.timer

systemctl stop apt-daily.service

systemctl daemon-reload

精彩评论(0)

0 0 举报