成都网站建设设计

将想法与焦点和您一起共享

精致的参数-max_binlog_files-创新互联

max_binlog_files,是Percona MySQL分支提供的限制binlog文件数量的参数,在删除归档数据、binlog增长很快的情况下,很实用的一个参数。

创新互联自2013年创立以来,先为梅列等服务建站,梅列等地企业,进行企业商务咨询服务。为梅列企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

该参数也对正在被使用的binlog提供了保护,是purge不掉的,如下。

[root@mysql.sock][(none)]>purge binary logs to 'bin.016222';

Query OK, 0 rows affected, 1 warning (0.01 sec)

[root@mysql.sock][(none)]>>show warnings;

+---------+------+------------------------------------------------------------------------------------------------------+

| Level   | Code | Message                                                                                                        |

+---------+------+------------------------------------------------------------------------------------------------------+

| Warning | 1867 | file ./bin.016215 was not purged because it was being read by 1 thread(s), purged only 0 out of 7 files. |

+---------+------+------------------------------------------------------------------------------------------------------+

1 row in set (0.00 sec)

$ perror 1867

MySQL error code 1867 (ER_WARN_PURGE_LOG_IN_USE): file %s was not purged because it was being read by %d thread(s), purged only %d out of %d files.

error日志中也是用体现的。

2019-09-18T01:02:56.643574+08:00 10326541 [Warning] file ./bin.016215 was not purged because it was being readby thread number 17218543

2019-09-18T01:03:18.196285+08:00 17244031 [Warning] file ./bin.016215 was not purged because it was being readby thread number 17218543

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文题目:精致的参数-max_binlog_files-创新互联
地址分享:http://chengdu.cdxwcx.cn/article/hgcgd.html