因为我的mysql数据库只与一个小的web应用程序一起使用,所以我永远不需要任何复制功能。在监控过程中,我注意到一个名为thread/sql/compress_gtid_table的东西。在使用mysqldump转储一些表时,我收到了这样的警告:
Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that changed suppressed parts of the database. If you don't want to restore GTIDs, pass --set-gtid-purged=OFF. To make a complete dump, pass --all-databases --triggers --routines --events.我如何确保所有的GTID特性都被完全禁用,并且不会造成开销?
下面是我的配置:
mysql> SHOW VARIABLES LIKE '%GTID%';
+----------------------------------+----------------+
| Variable_name | Value |
+----------------------------------+----------------+
| binlog_gtid_simple_recovery | ON |
| enforce_gtid_consistency | OFF |
| gtid_executed_compression_period | 1000 |
| gtid_mode | OFF |
| gtid_next | AUTOMATIC |
| gtid_owned | |
| gtid_purged | |
| session_track_gtids | OFF |
+----------------------------------+----------------+发布于 2021-02-26 03:35:12
我只是在搜索那个警告的时候被链接到这里。我正在设置GTID,但这个页面可能会对您有所帮助:https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-howto.html
注意,有一个警告,一旦你打开了GTID,你就不能很容易地倒退了。我相信有一种方法,但可能不值得这么麻烦。
发布于 2021-09-15 09:43:21
禁用GTID复制后,您不再需要更多的旧二进制日志(具有GTID信息),并且从站已经捕获了所有的binlog信息,您可以停止从站并执行reset master;,它将从服务器中清除所有的binlog,并且不会保留更多的gtid信息。有关如何正确重新同步复制的信息,请参阅此post。
https://stackoverflow.com/questions/64337585
复制相似问题