mysql Failed to start LSB: start and stop MySQL

· 会写bug的大佬 · 88阅读 · 2022-07-04

详细描述

一般出现情况是重启mysql或者在运行过程中mysql卡死,再重新启动失败的情况,service start mysql 无法启动

版本信息

mysql 5.7

复现过程

设备内存不足时,即可能出现该情况,或者给mysql分配了太多内存也会导致启动失败,出现 Failed to start LSB: start and stop MySQL错误

mysql 运行日志片段如下:

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'BLACKHOLE'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'ARCHIVE'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'MRG_MYISAM'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'MyISAM'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'MEMORY'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'CSV'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'sha256_password'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'mysql_old_password'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'mysql_native_password'

2022-07-04 21:45:42 2925 [Note] Shutting down plugin 'binlog'

2022-07-04 21:45:42 2925 [Note] /www/server/mysql/bin/mysqld: Shutdown complete

 

解决方案

将mysql的各项内存分配调低,重启即可

文章有用

已有 6人 推荐该文章,推荐越多越容易获得的官方扶持

微信扫码分享