mysql innodb不生效_mysql修改innodb_buffer_pool_size无效

在尝试启动MySQL时遇到错误,InnoDB初始化缓冲池失败,报错'Cannot allocate memory for the buffer pool',尽管系统内存充足。尝试通过修改`innodb_buffer_pool_size`为60M并在启动时手动指定,但问题依然存在。启动日志显示缓冲池初始化仍为128.0M,可能存在配置未生效或启动参数传递错误的问题。
摘要由CSDN通过智能技术生成

mysql在启动的时候总是报

2015-06-04 14:44:21 12771 [Note] InnoDB: Initializing buffer pool, size = 128.0M

InnoDB: mmap(137363456 bytes) failed; errno 12

2015-06-04 14:44:21 12771 [ERROR] InnoDB: Cannot allocate memory for the buffer pool

查看了一下内存

total used free shared buffers cached

Mem: 994 524 470 0 4 28

-/+ buffers/cache: 491 503

Swap: 0 0 0

还剩400多M,其实是够用的,不知道为什么无法allocate,然后想修改innodb_buffer_poo_size

[mysqld]

datadir = /data/mysqldb

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

explicit_defaults_for_timestamp = true

[innodb]

innodb_buffer_pool_size = 60M

重新启动的时候还是显示

2015-06-04 15:00:21 12946 [Note] InnoDB: Initializing buffer pool, size = 128.0M

InnoDB: mmap(137363456 bytes) failed; errno 12

2015-06-04 15:00:21 12946 [ERROR] InnoDB: Cannot allocate memory for the buffer pool

另外我启动的时候手动指定变量也无效

/etc/init.d/mysqld start innodb-buffer-pool-size 60M

2015-06-04 15:06:55 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.25) starting as process 13279 ...

2015-06-04 15:06:55 13279 [Note] Plugin 'FEDERATED' is disabled.

2015-06-04 15:06:55 13279 [Note] InnoDB: Using atomics to ref count buffer pool pages

2015-06-04 15:06:55 13279 [Note] InnoDB: The InnoDB memory heap is disabled

2015-06-04 15:06:55 13279 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2015-06-04 15:06:55 13279 [Note] InnoDB: Memory barrier is not used

2015-06-04 15:06:55 13279 [Note] InnoDB: Compressed tables use zlib 1.2.3

2015-06-04 15:06:55 13279 [Note] InnoDB: Using CPU crc32 instructions

2015-06-04 15:06:55 13279 [Note] InnoDB: Initializing buffer pool, size = 128.0M

InnoDB: mmap(137363456 bytes) failed; errno 12

2015-06-04 15:06:55 13279 [ERROR] InnoDB: Cannot allocate memory for the buffer pool

2015-06-04 15:06:55 13279 [ERROR] Plugin 'InnoDB' init function returned error.

2015-06-04 15:06:55 13279 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

/usr/local/mysql/bin/mysqld: Too many arguments (first extra is 'innodb-buffer-pool-size').

Use --verbose --help to get a list of available options

2015-06-04 15:06:55 13279 [ERROR] Aborting

请教大侠指点一下问题可能出现在哪里?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值