详细报错如下
-
201014 9:37:50 InnoDB: Compressed tables use zlib 1.2.7
201014 9:37:50 InnoDB: Using Linux native AIO
201014 9:37:50 InnoDB: Initializing buffer pool, size = 64.0M
InnoDB: mmap(68878336 bytes) failed; errno 12
201014 9:37:50 InnoDB: Completed initialization of buffer pool
201014 9:37:50 InnoDB: Fatal error: cannot allocate memory for the buffer pool
201014 9:37:50 [ERROR] Plugin 'InnoDB' init function returned error.
201014 9:37:50 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
201014 9:37:50 [Note] Plugin 'FEEDBACK' is disabled.
201014 9:37:50 [ERROR] Unknown/unsupported storage engine: InnoDB
网上也收集了很多文章都不能解决这个问题,一直看到这篇文章刚好解决了这个问题,收藏一下‘
https://www.cnblogs.com/olinux/p/5144205.html
解决方法如下:
查看内存
-
$ free
-
total used free shared buffers cached
-
Mem: 608476 565044 43432 0 1284 53996
-
-/+ buffers/cache: 509764 98712
-
Swap: 0 0 0
明显的swap问题。适当增加swap
-
$ sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 #增加1G的SWAP进去
-
$ sudo mkswap /swapfile
-
$ sudo swapon /swapfile
-
$ free
-
total used free shared buffers cached
-
Mem: 608476 601432 7044 0 824 88752
-
-/+ buffers/cache: 511856 96620
-
Swap: 1048572 0 1048572
然后启动完美解决