MySQL ERROR 1193 Unknown system variable GTID_PURGED

When restoring MySQL backup taken on Amazon RDS, i get error

root@PRD-50ml:~# mysql sok_db2 < db.sql
ERROR 1193 (HY000) at line 24: Unknown system variable 'GTID_PURGED'
root@PRD-50ml:~# 

To fix this, open db.sql in text editor, remove the line

SET @@GLOBAL.GTID_PURGED='';

Another solution is take a new MySQL backup with --set-gtid-purged=OFF option and restore it.

mysqldump -u DB_USER -p --set-gtid-purged=OFF --triggers --routines --events DB_NAME > DB_NAME.sql

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *