Mysql常见错误

来自linux中国网wiki
跳到导航 跳到搜索

MySQL 配置了过大的内存导致无法启动:InnoDB: Cannot allocate memory for the buffer pool

朋友遇到的问题 

mysql启动不了 报 innodb cannot allocate memory for the buffer pool 

修改/etc/my.inf文件,将innodb_buffer_pool_size改小

innodb_buffer_pool_size = 32M

buffer pool, size = 128.0M  然后把这个改小了 
改成64M


别人的解说 
解决办法
需要调整 MySQL 配置文件 my.cnf 中的 “innodb_buffer_pool_size”、”key_buffer_size” 的大小设置,适当的调大内存分配,一般调整为系统内存的一半


这个说得有点夸张  参考自己的 free wiki 
命令 free -m 详解

    total:内存总数;
    used:已经使用的内存数;
    free:空闲的内存数;
    shared:当前已经废弃不用;
    buffers Buffer:缓存内存数;
    cached Page:缓存内存数。


InnoDB: Cannot allocate memory for the buffer pool


https://blog.csdn.net/zhouzhiwengang/article/details/51809650

https://blog.csdn.net/xianglingchuan/article/details/72725346

https://www.cnblogs.com/rocly/p/10368368.html