Toogle 发表于 2021-11-9 15:19:57

MySQL被关闭,是什么原因?

突然发现打开网站,连接不上数据库,于是登录宝塔,发现MySQL被关闭了。看了一下,应该是2号被关闭的。日志如下:

2021-11-02 22:59:29 14448 Binlog end
2021-11-02 22:59:29 14448 Shutting down plugin 'partition'
2021-11-02 22:59:29 14448 Shutting down plugin 'PERFORMANCE_SCHEMA'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_DATAFILES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_TABLESPACES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_FOREIGN'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_FIELDS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_COLUMNS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_INDEXES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_TABLESTATS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_TABLES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_CONFIG'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_BEING_DELETED'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_DELETED'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_METRICS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_BUFFER_PAGE'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP_PER_INDEX'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMPMEM_RESET'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMPMEM'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP_RESET'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_LOCK_WAITS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_LOCKS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_TRX'
2021-11-02 22:59:29 14448 Shutting down plugin 'BLACKHOLE'
2021-11-02 22:59:29 14448 Shutting down plugin 'ARCHIVE'
2021-11-02 22:59:29 14448 Shutting down plugin 'MRG_MYISAM'
2021-11-02 22:59:29 14448 Shutting down plugin 'MyISAM'
2021-11-02 22:59:29 14448 Shutting down plugin 'MEMORY'
2021-11-02 22:59:29 14448 Shutting down plugin 'CSV'
2021-11-02 22:59:29 14448 Shutting down plugin 'sha256_password'
2021-11-02 22:59:29 14448 Shutting down plugin 'mysql_old_password'
2021-11-02 22:59:29 14448 Shutting down plugin 'mysql_native_password'
2021-11-02 22:59:29 14448 Shutting down plugin 'binlog'
2021-11-02 22:59:29 14448 /www/server/mysql/bin/mysqld: Shutdown complete


谢谢!~

Toogle 发表于 2021-11-9 15:21:42

检测当前服务器的MySQL端口是否安全( 检测时间:刚刚,耗时:23.50毫秒 ,等级:中危)折叠|忽略|检测
检测类型:MySQL端口安全风险等级:中危
风险描述:当前MySQL端口: 3306,可被任意服务器访问,这可能导致MySQL被暴力破解,存在安全隐患
解决方案:1、若非必要,在【安全】页面将MySQL端口的放行删除
2、通过【系统防火墙】插件修改MySQL端口的放行为限定IP,以增强安全性
3、使用【Fail2ban防爆破】插件对MySQL服务进行保护

这个??

很少研究宝塔的使用,看来得多看看……

:Q

Toogle 发表于 2021-11-9 15:26:25

Fail2ban防爆破是免费的,刚刚安装了,还有什么其它建议吗?

河小马 发表于 2021-11-9 17:00:51

error log 日志不全啊。。目前还是无法判断的
先重启mysql吧,然后时时观察一下mysql

老刘 发表于 2021-11-9 18:45:47

日志不全.盲猜是崩溃了
升级到MYSQL5.7试试

Toogle 发表于 2021-11-9 21:50:53

河小马 发表于 2021-11-9 17:00
error log 日志不全啊。。目前还是无法判断的
先重启mysql吧,然后时时观察一下mysql
...

好的,已经重启正常了……

应该是2号出现的,下面这个是2号全部的日志。

2021-06-27 22:54:22 4646 /www/server/mysql/bin/mysqld: ready for connections.
Version: '5.6.37-log'socket: '/tmp/mysql.sock'port: 3306Source distribution

2021-11-02 22:59:29 14448 Plugin 'FEDERATED' is disabled.
2021-11-02 22:59:29 14448 InnoDB: Using atomics to ref count buffer pool pages
2021-11-02 22:59:29 14448 InnoDB: The InnoDB memory heap is disabled
2021-11-02 22:59:29 14448 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-11-02 22:59:29 14448 InnoDB: Memory barrier is not used
2021-11-02 22:59:29 14448 InnoDB: Compressed tables use zlib 1.2.3
2021-11-02 22:59:29 14448 InnoDB: Using Linux native AIO
2021-11-02 22:59:29 14448 InnoDB: Using CPU crc32 instructions
2021-11-02 22:59:29 14448 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2021-11-02 22:59:29 14448 InnoDB: Cannot allocate memory for the buffer pool
2021-11-02 22:59:29 14448 Plugin 'InnoDB' init function returned error.
2021-11-02 22:59:29 14448 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-11-02 22:59:29 14448 Unknown/unsupported storage engine: InnoDB
2021-11-02 22:59:29 14448 Aborting

2021-11-02 22:59:29 14448 Binlog end
2021-11-02 22:59:29 14448 Shutting down plugin 'partition'
2021-11-02 22:59:29 14448 Shutting down plugin 'PERFORMANCE_SCHEMA'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_DATAFILES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_TABLESPACES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_FOREIGN'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_FIELDS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_COLUMNS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_INDEXES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_TABLESTATS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_SYS_TABLES'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_CONFIG'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_BEING_DELETED'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_DELETED'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_METRICS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_BUFFER_PAGE'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP_PER_INDEX'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMPMEM_RESET'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMPMEM'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP_RESET'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_CMP'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_LOCK_WAITS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_LOCKS'
2021-11-02 22:59:29 14448 Shutting down plugin 'INNODB_TRX'
2021-11-02 22:59:29 14448 Shutting down plugin 'BLACKHOLE'
2021-11-02 22:59:29 14448 Shutting down plugin 'ARCHIVE'
2021-11-02 22:59:29 14448 Shutting down plugin 'MRG_MYISAM'
2021-11-02 22:59:29 14448 Shutting down plugin 'MyISAM'
2021-11-02 22:59:29 14448 Shutting down plugin 'MEMORY'
2021-11-02 22:59:29 14448 Shutting down plugin 'CSV'
2021-11-02 22:59:29 14448 Shutting down plugin 'sha256_password'
2021-11-02 22:59:29 14448 Shutting down plugin 'mysql_old_password'
2021-11-02 22:59:29 14448 Shutting down plugin 'mysql_native_password'
2021-11-02 22:59:29 14448 Shutting down plugin 'binlog'
2021-11-02 22:59:29 14448 /www/server/mysql/bin/mysqld: Shutdown complete

2021-11-09 15:13:07 2834 Plugin 'FEDERATED' is disabled.

sead 发表于 2021-11-9 23:47:21

df -hl
先看看硬盘是不是满了

Toogle 发表于 2021-11-10 13:32:18

sead 发表于 2021-11-9 23:47
先看看硬盘是不是满了

这个宝塔控制面板里也看得到,没满……

ensky 发表于 2021-11-10 14:57:24

你这个机器什么配置?几核几GB的RAM。我以前遇到过1H1GB装宝塔有问题,需要改配置的,不改配置几天MySQL就自动宕机一次。

Toogle 发表于 2021-11-10 15:38:52

ensky 发表于 2021-11-10 14:57
你这个机器什么配置?几核几GB的RAM。我以前遇到过1H1GB装宝塔有问题,需要改配置的,不改配置几天MySQL就 ...

1核
RAM 2GB

在哪里改?

谢谢!~

ensky 发表于 2021-11-10 16:31:39

Toogle 发表于 2021-11-10 15:38
1核
RAM 2GB



看这个地方https://www.advertcn.com/forum.php?mod=viewthread&tid=97673&page=1#pid490481

Toogle 发表于 2021-11-10 21:53:38

ensky 发表于 2021-11-10 16:31
看这个地方https://www.advertcn.com/forum.php?mod=viewthread&tid=97673&page=1#pid490481

看到了,之前我还回过帖子,只是忘记了……

这就搞一下。

谢谢!

Toogle 发表于 2021-11-10 22:09:05

ensky 发表于 2021-11-10 16:31
看这个地方https://www.advertcn.com/forum.php?mod=viewthread&tid=97673&page=1#pid490481

看了一下,没办法resize,重新建一个吗?如果是,旧的应该如何处理?
谢谢!~


zzfree 发表于 2021-11-11 06:55:53

内存不够用

ensky 发表于 2021-11-11 09:25:14

Toogle 发表于 2021-11-10 22:09
看了一下,没办法resize,重新建一个吗?如果是,旧的应该如何处理?
谢谢!~



不能resize,这个我没有经验了,看看其余大佬有没有办法。
页: [1] 2
查看完整版本: MySQL被关闭,是什么原因?