A MySQL Database Restore Operation Fails

Article ID: 54347

Article Type: Troubleshooting

Last Modified:

A MySQL database restore operation fails.

Symptoms

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]

Causes

GTID-based replication is running on the MySQL server.

Resolution

  1. Use the following command to determine whether GTID-based replication is enabled on the MySQL server:
mysql> show global variables like "%gtid%";
  1. If GTID-based replication is enabled, then use the following command to reset the master, and then restore the database.
mysql> reset master;

Reset the master before restoring each database.

1 Commvault Way, Tinton Falls, NJ 07724 Sitemap | Legal Notices | Trademarks | Privacy Policy
Copyright © Commvault | All Rights Reserved.