mysql> show variables like '%sync_binlog%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sync_binlog | 2 |
+---------------+-------+
1 row in set (0.00 sec)
SET GLOBAL sync_binlog = 5;
重新登录:
[root@master aa]# mysql -uroot -p1234567
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 5.6.22-log Source distribution
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables like '%sync_binlog%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sync_binlog | 5 |
+---------------+-------+
1 row in set (0.00 sec)
还需要写入my.cnf文件
mysql 动态修改参数
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
swagger 动态显示枚举enums内容注释 只修改一次(自定义注解实现)
swagger 动态显示枚举enums内容注释 只修改一次(自定义注解实现)
spring java swagger 注解 enum