繁体   English   中英

MySQL:无法通过编辑my.ini / my.cnf增加innodb_buffer_pool_size

[英]MySQL: Can't increase innodb_buffer_pool_size by editing my.ini / my.cnf

运行查询时,我收到错误消息“错误1206(HY000):锁的总数超过了锁表的大小”。 经过几次搜索,我知道增加innodb_buffer_pool_size应该可以解决此问题。 但是我这样做有些麻烦。

我正在使用MySQL Workbench 6.3 CE,并找到了一个名为“ ... \\ MySQL \\ MySQL Server 5.6 \\ my-default.ini”的文件。 我找不到任何名为my.ini或my.cnf的文件。 根据本网站上其他问题的答案的建议,我编辑了此文件,以便阅读的部分

[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

现在读

[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
innodb_buffer_pool_size = 1024M

但是这似乎与原始错误和我运行时没有区别

SELECT variable_value FROM information_schema.global_variables
WHERE variable_name = 'innodb_buffer_pool_size';

它与返回的大小没有区别:263,192,576。

我尝试创建my-default.ini的副本并将其另存为my.ini,但这也无济于事。

任何帮助将不胜感激!

多亏了Dragonthoughts,我搜索了无锁提示的信息,并发现了这一点- 在不导致MySQL锁定的情况下进行选择的任何方法?

然后,我使用以下代码

SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
Create X as Select * from Y where Z in ('2012','2013', '2014', '2015');
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ ;

这似乎工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM