Java321技术网

标题: centos新安装mysql5.6报错了 [打印本页]

作者: luozhangyou    时间: 2017-9-13 02:25
标题: centos新安装mysql5.6报错了
2017-09-12 14:15:09 3442 [Note] Plugin 'FEDERATED' is disabled.
2017-09-12 14:15:09 3442 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-09-12 14:15:09 3442 [Note] InnoDB: The InnoDB memory heap is disabled
2017-09-12 14:15:09 3442 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-12 14:15:09 3442 [Note] InnoDB: Memory barrier is not used
2017-09-12 14:15:09 3442 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-12 14:15:09 3442 [Note] InnoDB: Using Linux native AIO
2017-09-12 14:15:09 3442 [Note] InnoDB: Not using CPU crc32 instructions
2017-09-12 14:15:09 3442 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(136019968 bytes) failed; errno 12
2017-09-12 14:15:09 3442 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-09-12 14:15:09 3442 [ERROR] Plugin 'InnoDB' init function returned error.
2017-09-12 14:15:09 3442 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-09-12 14:15:09 3442 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-09-12 14:15:09 3442 [ERROR] Aborting


解决办法:

查看内存
  1. $ free
  2.              total       used       free     shared    buffers     cached
  3. Mem:        608476     565044      43432          0       1284      53996
  4. -/+ buffers/cache:     509764      98712
  5. Swap:            0          0          0
复制代码



好吧,明显的swap问题。适当增加swap,采用
  1. $ sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 #增加1G的SWAP进去
  2. $ sudo mkswap /swapfile
  3. $ sudo swapon /swapfile
  4. $ free
  5.              total       used       free     shared    buffers     cached
  6. Mem:        608476     601432       7044          0        824      88752
  7. -/+ buffers/cache:     511856      96620
  8. Swap:      1048572          0    1048572
复制代码


此处不建议将swapon 写到/etc/fstab这里,直接写到/etc.rc.local中更为稳妥
启动解决...






欢迎光临 Java321技术网 (https://java321.com/) Powered by Discuz! X3.3