《mysql InnoDB: Cannot allocate memory for the buffer poolMysql学习》要点:
本文介绍了mysql InnoDB: Cannot allocate memory for the buffer poolMysql学习,希望对您有用。如果有疑问,可以联系我们。
- 2017-09-03 17:38:21 20390 [Note] InnoDB: The InnoDB memory heap is disabled
- 2017-09-03 17:38:21 20390 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
- 2017-09-03 17:38:21 20390 [Note] InnoDB: Memory barrier is not used
- 2017-09-03 17:38:21 20390 [Note] InnoDB: Compressed tables use zlib 1.2.3
- 2017-09-03 17:38:21 20390 [Note] InnoDB: Using Linux native AIO
- 2017-09-03 17:38:21 20390 [Note] InnoDB: Using CPU crc32 instructions
- 2017-09-03 17:38:21 20390 [Note] InnoDB: Initializing buffer pool, size = 128.0M
- InnoDB: mmap(137363456 bytes) failed; errno 12
- 2017-09-03 17:38:21 20390 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
- 2017-09-03 17:38:21 20390 [ERROR] Plugin ‘InnoDB’ init function returned error.
- 2017-09-03 17:38:21 20390 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
- 2017-09-03 17:38:21 20390 [ERROR] Unknown/unsupported storage engine: InnoDB
- 2017-09-03 17:38:21 20390 [ERROR] Aborting
- 2017-09-03 17:38:21 20390 [Note] Binlog end
- 2017-09-03 17:38:21 20390 [Note] Shutting down plugin ‘partition’
- 2017-09-03 17:38:21 20390 [Note] Shutting down plugin ‘PERFORMANCE_SCHEMA’
其中标为黄色的就比较重要了,百度Cannot allocate memory for the buffer pool都说是无法给innodb分配足够的内存,大多数给出的解决的方案是:修改innodb_buffer_pool_size,但是我这个my.cnf里面没有,那就加一个被呗,顺便将这个字段设置成200M,重启mysql发现一样的结果,还是启动不了,去看日志还是一样的问题,还是太大咯?
用free -m看下
total used free shared buff/cache available
Mem: 992 574 159 0 258 260
Swap: 0 0 0
只有185M的内存了,只能再改小点咯,改成64.
service mysqld restart,终于
Starting MySQL. [ OK ]MYSQL学习
转载请注明本页网址:
http://www.vephp.com/jiaocheng/5029.html