Help Center/ Relational Database Service/ Troubleshooting/ RDS for MySQL/ Backup and Restoration Issues/ SQL Statements Such as SET @@SESSION.SQL_LOG_BIN Displayed After You Run mysqldump
Updated on 2022-12-05 GMT+08:00

SQL Statements Such as SET @@SESSION.SQL_LOG_BIN Displayed After You Run mysqldump

Scenario

When you run mysqldump on a database, the following code is displayed:
Figure 1 Code

Fault Analysis

The parameter gtid-mode is set to ON.

If GTID is enabled for a database, you can use mysqldump to back up or dump all Global Transaction Identifiers (GTIDs) in the database or even to back up the whole RDS for MySQL database.

Solution

When the primary and standby RDS for MySQL databases are exported for backup and restoration, check whether GTID is enabled.

If GTID is enabled, add –set-gtid-purged=OFF to the mysqldump command during data dump.