New features introduced in 8.0 类似Oracle SPFILE
mysql> set persist innodb_buffer_pool_size=2048*1024*1024;
Query OK, 0 rows affected (0.01 sec)
mysql> show variables like ‘innodb_buffer_pool_size‘;
+-------------------------+------------+
| Variable_name | Value |
+-------------------------+------------+
| innodb_buffer_pool_size | 2147483648 |
+-------------------------+------------+
1 row in set (0.00 sec)
mysql> set persist innodb_buffer_pool_size=4096*1024*1024;
Query OK, 0 rows affected (0.01 sec)
mysql> show variables like ‘innodb_buffer_pool_size‘;
+-------------------------+------------+
| Variable_name | Value |
+-------------------------+------------+
| innodb_buffer_pool_size | 4294967296 |
+-------------------------+------------+
1 row in set (0.00 sec)
mysql>
[ data]# pwd
/zxdata/my3311/data
[ data]# ls -l mysqld-auto.cnf
-rw-r-----. 1 mysql mysql 186 Dec 24 08:59 mysqld-auto.cnf
[ data]# more mysqld-auto.cnf
{ "Version" : 1 , "mysql_server" : { "innodb_buffer_pool_size" : { "Value" : "4294967296" , "Metadata" : { "Timestamp" :
1577149148131600 , "User" : "root" , "Host" : "localhost" } } } }
[ data]#
持久化参数直接写入到mysqld-auto.cnf文件中。具体内容看官方文档。
相关推荐
lklong 2020-11-22
oraclemch 2020-11-06
shilukun 2020-10-10
周嘉笙 2020-11-09
iilegend 2020-10-19
EricRay 2020-10-16
zhuzhufxz 2020-09-16
dataminer 2020-08-17
bfcady 2020-08-16
Hody 2020-08-16
FightFourEggs 2020-08-16
数据库设计 2020-08-16
Seandba 2020-08-16
Omega 2020-08-16
zjyzz 2020-08-16
yanghuatong 2020-08-16
ktyl000 2020-08-16
dbasunny 2020-08-16