Skip to content
Home » MySQL » Change innodb_buffer_pool_size Online

Change innodb_buffer_pool_size Online

If you'd like to raise innodb_buffer_pool_size without restarting mysqld, you can set the variable at run-time. The size unit is in byte.

mysql> set global innodb_buffer_pool_size = 5368709120;
Query OK, 0 rows affected (0.01 sec)

mysql> show variables like 'innodb_buffer_pool_size';
| Variable_name           | Value      |
| innodb_buffer_pool_size | 5368709120 |
1 row in set (0.00 sec)

Please note that, you can't set the parameter to a value that is less than the current one at run-time.

For permanent setting, you can add the key-value pair under [mysqld] section in /etc/my.cnf.

Leave a Reply

Your email address will not be published. Required fields are marked *