设置MySQL的innodb_buffer_pool_size参数

2017-01-13 10:48:03来源:oschina作者:长工人点击

In the earlier versions of MySQL ( < 5.7.5 ) the only way to set



'innodb_buffer_pool_size'



variable was by writing it to my.cnf (for linux) and my.ini (for windows) under [mysqld] section :


[mysqld]
innodb_buffer_pool_size = 2147483648

You need to restart your mysql server to have it's effect in action.


UPDATE :

As of MySQL 5.7.5, the innodb_buffer_pool_size configuration option can be set dynamically using a SET statement, allowing you to resize the buffer pool without restarting the server. For example:


mysql> SET GLOBAL innodb_buffer_pool_size=402653184;

Reference : http://dev.mysql.com/doc/refman/5.7/en/innodb-buffer-pool-online-resize.html

Windows上修改my.ini文件后,需要运行net stop mysql和net start mysql关闭并重启MySQL服务。

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台