mysql 内存不足引发的坑

在尝试重启MySQL时遇到'Out of memory error: InnoDB can't start without enough memory'的错误,系统内存仅413M且无Swap分区。根据MySQL官网,服务器默认配置适用于约512MB内存的虚拟机。为在有限内存下启动MySQL,通过编辑/etc/my.cnf添加配置,成功解决了问题。
摘要由CSDN通过智能技术生成

问题:

[root@iZuzc9f4ma6h2iZ ~]# service mysqld restart
MySQL server PID file could not be found!                  [FAILED]
Starting MySQL.Logging to '/var/log/mysql/error.log'.
The server quit without updating PID file (/data/mysql/iZuz[FAILED]2iZ.pid).

第一直觉告诉我google “ MySQL server PID file could not be found!  [FAILED]”,可基本没什么用。

后开有人说看看报错信息,于是:

[root@iZuzc9f4ma6h2iZ ~]# tail -n 50 /data/mysql/iZuzc9f4ma6h2iZ.err
InnoDB: mmap(137363456 bytes) failed; errno 12
2017-12-28 17:09:44 25065 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-12-28 17:09:44 25065 [ERROR] Plugin 'InnoDB' init function returned error.
2017-12-28 17:09:44 25065 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
201
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值