mysql – innodb_buffer_pool_size没有改变
作者:互联网
我使用MySQL 5.5.23-1~dotdeb.0(Debian),这里是my.cnf的相关部分
default-storage-engine = innodb
innodb_buffer_pool_size = 3G
innodb_log_file_size = 256M
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 4M
innodb_additional_mem_pool_size = 20M
问题在于,无论我为innodb_buffer_pool_size选择什么价值(我还试过4G和8G和8000M).我从mysql>得到以下内容显示全局变量;
| innodb_buffer_pool_size | 134217728
调优入门脚本的结果:
INNODB STATUS
Current InnoDB index space = 621 M
Current InnoDB data space = 3.82 G
Current InnoDB buffer pool free = 0 %
Current innodb_buffer_pool_size = 128 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory
我很感激你的提示来解决这个问题.
解决方法:
好的,谢谢this answer我发现我需要在my.cnf中设置配置WITHIN [mysqld]块才能生效.
我的错误是我刚刚在my.cnf文件的末尾添加了命令.
然后在mysql重启我遇到了
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
要解决此错误,我需要删除日志
rm -f /var/lib/mysql/ib_logfile[01]
并且在Rolando告诉here时重新开始.
标签:mysql,innodb,mysql-5-5,my-cnf 来源: https://codeday.me/bug/20190806/1599704.html