mysql报错mysqld_safe Number of processes running now: 0

mysql自动shutdown,查看mysql的日志发现如下内容:
160504 15:39:11 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.46-log) starting as process 82685 ...
160504 15:39:11 [Warning] Changed limits: max_open_files: 1024  max_connections: 214  table_cache: 256
160504 15:39:11 InnoDB: The InnoDB memory heap is disabled
160504 15:39:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160504 15:39:11 InnoDB: Compressed tables use zlib 1.2.3
160504 15:39:11 InnoDB: Initializing buffer pool, size = 128.0M
160504 15:39:11 InnoDB: Completed initialization of buffer pool
160504 15:39:11 InnoDB: highest supported file format is Barracuda.
160504 15:39:11  InnoDB: Waiting for the background threads to start
160504 15:39:12 InnoDB: 5.5.46 started; log sequence number 6304611743
160504 15:39:12 [Note] Recovering after a crash using /diskb/mysql_log/mysql-bin
160504 15:39:12 [Note] Starting crash recovery...
160504 15:39:12 [Note] Crash recovery finished.
160504 15:39:12 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160504 15:39:12 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160504 15:39:12 [Note] Server socket created on IP: '0.0.0.0'.
160504 15:39:12 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000011' at position 125966650, relay log '/diskb/mysql_log/relay-bin.000004' position: 125966796
160504 15:39:12 [Note] Slave I/O thread: connected to master 'mysync@192.168.1.143:3306',replication started in log 'mysql-bin.000011' at position 126049089
160504 15:39:12 [Note] Event Scheduler: Loaded 0 events
160504 15:39:12 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.46-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
160504 15:39:12 mysqld_safe Number of processes running now: 0
160504 15:39:12 mysqld_safe mysqld restarted

160504 15:39:12 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.46-log) starting as process 82847 ...
160504 15:39:12 [Warning] Changed limits: max_open_files: 1024  max_connections: 214  table_cache: 256
160504 15:39:12 InnoDB: The InnoDB memory heap is disabled
160504 15:39:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160504 15:39:12 InnoDB: Compressed tables use zlib 1.2.3
160504 15:39:12 InnoDB: Initializing buffer pool, size = 128.0M
160504 15:39:12 InnoDB: Completed initialization of buffer pool
160504 15:39:12 InnoDB: highest supported file format is Barracuda.
160504 15:39:12  InnoDB: Waiting for the background threads to start
160504 15:39:13 InnoDB: 5.5.46 started; log sequence number 6304611743
160504 15:39:13 [Note] Recovering after a crash using /diskb/mysql_log/mysql-bin
160504 15:39:13 [Note] Starting crash recovery...
160504 15:39:13 [Note] Crash recovery finished.
160504 15:39:13 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160504 15:39:13 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160504 15:39:13 [Note] Server socket created on IP: '0.0.0.0'.
160504 15:39:13 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000011' at position 125966650, relay log '/diskb/mysql_log/relay-bin.000004' position: 125966796
160504 15:39:13 [Note] Slave I/O thread: connected to master 'mysync@192.168.1.143:3306',replication started in log 'mysql-bin.000011' at position 126049089
160504 15:39:13 [Note] Event Scheduler: Loaded 0 events
160504 15:39:13 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.46-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
160504 15:39:14 mysqld_safe Number of processes running now: 0
160504 15:39:14 mysqld_safe mysqld restarted



这个是从库,总是重启,从这个警告猜测是打开文件数量限制问题
[Warning] Changed limits: max_open_files: 1024  max_connections: 214  table_cache: 256

设置
vi /etc/security/limits.conf

*      soft    nproc           65535
*      hard    nproc           65535
*      soft    nofile          65535
*      hard    nofile          65535


vi /etc/security/limits.d/90-nproc.conf

*      soft    nproc     65535
*      hard    nproc     65535
*      soft    nofile    65535
*      hard    nofile    65535


需要重启服务器,如果你出现类似的问题,建议下重启下服务器,估计就可以解决问题。



再次查看日志正常了

160504 15:45:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
160504 15:45:54 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.46-log) starting as process 3210 ...
160504 15:45:54 InnoDB: The InnoDB memory heap is disabled
160504 15:45:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160504 15:45:54 InnoDB: Compressed tables use zlib 1.2.3
160504 15:45:54 InnoDB: Initializing buffer pool, size = 128.0M
160504 15:45:54 InnoDB: Completed initialization of buffer pool
160504 15:45:54 InnoDB: highest supported file format is Barracuda.
160504 15:45:54  InnoDB: Waiting for the background threads to start
160504 15:45:55 InnoDB: 5.5.46 started; log sequence number 6304611743
160504 15:45:55 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160504 15:45:55 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160504 15:45:55 [Note] Server socket created on IP: '0.0.0.0'.
160504 15:45:56 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000011' at position 125966650, relay log '/diskb/mysql_log/relay-bin.000004' position: 125966796
160504 15:45:56 [Note] Slave I/O thread: connected to master 'mysync@192.168.1.143:3306',replication started in log 'mysql-bin.000011' at position 126049089
160504 15:45:56 [Note] Event Scheduler: Loaded 0 events
160504 15:45:56 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.46-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值