carson4344 发表于 2017-7-16 11:29:58

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: Starting LSB: start and stop MySQL...
Jul 16 11:24:24 mcpa2015 mysql: Starting MySQL
Jul 16 11:24:25 mcpa2015 systemd: mysql.service: Start operation timed out. Terminating.
Jul 16 11:24:25 mcpa2015 systemd: Failed to start LSB: start and stop MySQL.
Jul 16 11:24:25 mcpa2015 systemd: mysql.service: Unit entered failed state.
Jul 16 11:24:25 mcpa2015 systemd: mysql.service: Failed with result 'timeout'.

licess 发表于 2017-7-16 18:18:16

按反馈必读提供mysql日志

carson4344 发表于 2017-7-16 19:22:07

上傳.err 檔案
感謝幫助

licess 发表于 2017-7-17 11:22:21

回复 3# 的帖子

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

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

carson4344 发表于 2017-7-17 21:52:50

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

carson4344 发表于 2017-7-17 22:00:11

調小 innodb_buffer_pool_size 後 LNMP restart 後 可以了
页: [1]
查看完整版本: Ubuntu LNMP mysql 不能開啟