问题描述
由于我的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 |
+----------------------------------+----------------+
解决方法
我只是在搜索该警告时被链接到这里。我正在设置 GTID,但此页面可能对您有所帮助:https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-howto.html
注意有一个警告,一旦你打开 GTID,你就不能轻易倒退。我敢肯定有办法,但可能不值得麻烦。