🔥 Just Launched! Werra Premium Template for HyväSee it in Action

Fix “Unknown System Variable ‘GTID_PURGED’” Error When Importing MySQL Dump

By Jignesh ParmarUpdated on Jun 20, 2025 1 min read

Importing a MySQL database is a common requirement in several Magento 2 scenarios, such as setting up a staging environment, migrating a website from one server to another, restoring data from a backup after a loss, or transferring data between environments.

One of the errors you encounter is while importing a database or mysql dump that says “ERROR 1193 (HY000) at line X: Unknown system variable ‘GTID_PURGED” ?

Use the below solution to get it resolved:

Fix “Unknown System Variable ‘GTID_PURGED’” Error When Importing MySQL Dump

Open your SQL file and search for the following line.

SET @@GLOBAL.GTID_PURGED = ‘xxxxxx’;

or

SET GLOBAL GTID_PURGED=’…’;

Then, remove this line completely, save the file and import the database again.

Such an error happens in the case when the GTID_PURGED value is not supported in your current MySQL or MariaDB version.

This simple solution will resolve the error.

Jignesh Parmar Full Image
Article byJignesh Parmar

An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.