打印

Ubuntu LNMP mysql 不能開啟

Ubuntu LNMP mysql 不能開啟

我在ubuntu 安裝LNMP 已經一年多,在今天網頁不能顯示(沒有做任何改動)
在後台重啟後出現mysql 已經 stop by time out

重新啟動也不成:
相關資料如下
應該怎樣解決?

mysql.service - LSB: start and stop MySQL
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mysql.service.d
           └─override.conf
   Active: failed (Result: timeout) since Sun 2017-07-16 11:24:25 CST; 4min 41s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6345 ExecStart=/etc/init.d/mysql start (code=killed, signal=TERM)
   CGroup: /system.slice/mysql.service
           ├─6357 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-fi...
           └─6860 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysq...

Jul 16 11:24:24 mcpa2015 systemd[1]: Starting LSB: start and stop MySQL...
Jul 16 11:24:24 mcpa2015 mysql[6345]: Starting MySQL
Jul 16 11:24:25 mcpa2015 systemd[1]: mysql.service: Start operation timed out. Terminating.
Jul 16 11:24:25 mcpa2015 systemd[1]: Failed to start LSB: start and stop MySQL.
Jul 16 11:24:25 mcpa2015 systemd[1]: mysql.service: Unit entered failed state.
Jul 16 11:24:25 mcpa2015 systemd[1]: mysql.service: Failed with result 'timeout'.

TOP

按反馈必读提供mysql日志

TOP

上傳.err 檔案
感謝幫助
附件: 您所在的用户组无法下载或查看附件

TOP

回复 3# 的帖子

2017-07-16T03:32:09.303057Z 0 [ERROR] Can't create thread to handle new connection(errno= 11)
2017-07-16T03:32:09.310581Z 320 [Note] Aborted connection 320 to db: 'mcpa' user: 'mcpa' host: 'localhost' (Got an error reading communication packets)
Killed
。。。。。
2017-07-16T03:32:12.038928Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2017-07-16T03:32:12.038975Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-07-16T03:32:12.038986Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-07-16T03:32:12.039021Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-07-16T03:32:12.039031Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-07-16T03:32:12.039044Z 0 [ERROR] Failed to initialize plugins.
2017-07-16T03:32:12.039050Z 0 [ERROR] Aborting

内存不足mysql被kill,再启动时内存也不够分配的,如果不太以来innodb引擎可以调整 innodb_buffer_pool_size 调小些

TOP

但內存有4G,可用超過2G的容量也會這樣?

TOP

調小 innodb_buffer_pool_size 後 LNMP restart 後 可以了

TOP