mysqld进程几分钟重启一次,如何解决?

我的mysqld服务是用
cd /usr/local/mysql
./bin/mysqld_safe --defaults-file=/home/user/mysql/my.cnf &
来启动的,但是之前启动都没有问题,今天发现mysql进程启动后,查看/home/repay/mysql/data/<hostname>.err日志发现有以下信息几分钟会就出现一次。查看mysqld_safe没有丢失,但是mysqld进程一直隔几分钟重启一次,并且对应的mysql.sock文件也是几分钟前刚产生。就是每次重启都会再生成这个文件一次。请问能从日志中判断什么原因引起重启吗?以及如何解决。我看了另一台服务器也是同样的启动方法,它的mysqld进程就没有不停的重启。

170830 18:20:02 mysqld_safe Number of processes running now: 0
170830 18:20:02 mysqld_safe mysqld restarted
170830 18:20:02 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.47) starting as process 1414 ...
170830 18:20:02 [Note] Plugin 'FEDERATED' is disabled.
170830 18:20:02 InnoDB: The InnoDB memory heap is disabled
170830 18:20:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170830 18:20:02 InnoDB: Compressed tables use zlib 1.2.3
170830 18:20:02 InnoDB: Using Linux native AIO
170830 18:20:02 InnoDB: Initializing buffer pool, size = 128.0M
170830 18:20:02 InnoDB: Completed initialization of buffer pool
170830 18:20:02 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170830 18:20:02 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
170830 18:20:02 InnoDB: Waiting for the background threads to start
170830 18:20:03 InnoDB: 5.5.47 started; log sequence number 83660787
170830 18:20:03 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170830 18:20:03 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170830 18:20:03 [Note] Server socket created on IP: '0.0.0.0'.
170830 18:20:03 [Note] Event Scheduler: Loaded 0 events
170830 18:20:03 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.47' socket: '/tmp/mysql.sock3306' port: 3306 MySQL Community Server (GPL)

参与13

2同行回答

liucj2004liucj2004其它undefined
170830 18:20:02 mysqld_safe Number of processes running now: 0 的上面是什么日志?另外看一下/var/log/message里面有什么日志,是否有OOM相关的信息显示全部

170830 18:20:02 mysqld_safe Number of processes running now: 0 的上面是什么日志?另外看一下/var/log/message里面有什么日志,是否有OOM相关的信息

收起
农业其它 · 2017-08-30
浏览3025
luodi 邀答
  • 刘老师,您好!谢谢您的回复!上面这个日志是mysql的data数据目录下的*.err文件日志的内容。我看了/var/log/messages没有out关键字或OOM关键字信息。
    2017-08-31
luodiluodi系统运维工程师nl
原因已经找到了,是服务器被国外的攻击了,查看crontab里面多了东西,再比对/var/log/cron日志里的修改时间和数据库的*err日志的出错的时间一致。谢谢大家显示全部

原因已经找到了,是服务器被国外的攻击了,查看crontab里面多了东西,再比对/var/log/cron日志里的修改时间和数据库的*err日志的出错的时间一致。谢谢大家

收起
IT其它 · 2017-09-01
浏览2972

提问者

luodi
系统运维工程师nl

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2017-08-30
  • 关注会员:2 人
  • 问题浏览:3716
  • 最近回答:2017-09-01
  • X社区推广