When exporting an sql database from an instance (2nd gen) and importing it on another sql instance, I get the following error: ERROR 1839 (HY000) at line 24:
@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON.
According to https://superuser.com/questions/906843/import-mysql-data-failed-with-error-1839 this could be solved by making an sql dump with
--set-gtid-purged=OFF
But the gcloud sql instances export command does not support this. Is there another way to solve this issue?
(In an SQL Editor) run RESET MASTER on the database you're importing to.
issuing RESET MASTER resets the GTID execution history.
https://dev.mysql.com/doc/refman/5.7/en/reset-master.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With