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.

Advertisement

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

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement