请选择 进入手机版 | 继续访问电脑版

Java321技术网

 找回密码
 立即注册
搜索
热搜: centos
查看: 9456|回复: 0

centos新安装mysql5.6报错了

[复制链接]

126

主题

126

帖子

815

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
815
发表于 2017-9-13 02:25:26 | 显示全部楼层 |阅读模式
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中更为稳妥
启动解决...

回复

使用道具 举报

QQ|Archiver|手机版|小黑屋|Java321技术网   蜀ICP备15030946号-1

GMT+8, 2024-3-29 15:00 , Processed in 0.061349 second(s), 33 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表