mysql5.7在线更改innodb_buffer_pool_size

 #####################################

在线更改是有风险的:

 

 ################

show variables like 'innodb_buffer_pool_size';

set global innodb_buffer_pool_size=53687091200;
# 在线更改该值时,不会立即生效,大概需要30s左右的时间才会完全生效。 ########################################################
> show variables like 'innodb_buffer_pool_size'; +-------------------------+-------------+ | Variable_name | Value | +-------------------------+-------------+ | innodb_buffer_pool_size | 85899345920 | +-------------------------+-------------+ 1 row in set (0.00 sec) Fri Oct 25 12:34:46 2019> set global innodb_buffer_pool_size=53687091200; Query OK, 0 rows affected (0.00 sec) Fri Oct 25 12:35:25 2019> show variables like 'innodb_buffer_pool_size'; +-------------------------+-------------+ | Variable_name | Value | +-------------------------+-------------+ | innodb_buffer_pool_size | 85899345920 | +-------------------------+-------------+ 1 row in set (0.00 sec) Fri Oct 25 12:35:28 2019> show variables like 'innodb_buffer_pool_size'; +-------------------------+-------------+ | Variable_name | Value | +-------------------------+-------------+ | innodb_buffer_pool_size | 85899345920 | +-------------------------+-------------+ 1 row in set (0.00 sec) Fri Oct 25 12:35:38 2019 > show variables like 'innodb_buffer_pool_size'; +-------------------------+-------------+ | Variable_name | Value | +-------------------------+-------------+ | innodb_buffer_pool_size | 85899345920 | +-------------------------+-------------+ 1 row in set (0.00 sec) Fri Oct 25 12:35:55 2019> show variables like 'innodb_buffer_pool_size'; +-------------------------+-------------+ | Variable_name | Value | +-------------------------+-------------+ | innodb_buffer_pool_size | 52848230400 | +-------------------------+-------------+ 1 row in set (0.00 sec) Fri Oct 25 12:36:16 2019 >

 

################################################

posted @ 2019-10-25 12:34  igoodful  阅读(1573)  评论(0编辑  收藏  举报