mysql5.7在线更改innodb_buffer_pool_size

Posted igoodful

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 >

 

以上是关于mysql5.7在线更改innodb_buffer_pool_size的主要内容,如果未能解决你的问题,请参考以下文章

centos67在线升级mysql到mysql5.7

mysql5.7主从复制--在线变更复制类型

MySQL5.7在线开启/关闭GTID

5分钟了解MySQL5.7的undo log在线收缩新特性

5分钟了解MySQL5.7的undo log在线收缩新特性

MySQL5.7新特性——在线收缩undo表空间