Article ID: 54347
Article Type: Troubleshooting
Last Modified:
A MySQL database restore operation fails.
A MySQL database restore operation or log restore operation fails with the following error message in the MySqlRestore.log file:
47225 b89f 08/07 12:38:39 512557 MySqlChildProcess::ReadErrBuf() - ReadFile: LastError=0 47225 b89f 08/07 12:38:39 512557 MySqlChildProcess::ReadErrBuf() - Got Error ERROR 1840 (HY000) at line 22: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty. 47225 b89f 08/07 12:38:39 512557 MySqlChildProcess::WriteBuf() - Error Stream: ERROR 1840 (HY000) at line 22: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty. 47225 b89f 08/07 12:38:39 512557 MySqlRestore::OnBufferPlData() - Failed to write data , rc=[0]
GTID-based replication is running on the MySQL server.
mysql> show global variables like "%gtid%";
mysql> reset master;
Reset the master before restoring each database.