1.1.1 phenomena
The exported database encountered the following error when importing:
ERROR 1839 (HY000) at line: @ @GLOBAL. Gtid_purged can only is set when @ @GLOBAL. Gtid_mode = on.
1.1.2 cause
Gtid_executed:
When used with global scope, this variable contains a representation of the SET of all transactions that is logged in the BINARY log.
When used with SESSION scope, it contains a representation of the SET of transactions that is written to the cache in the Current SESSION.
Issuing reset MASTER causes the global value (but not the SESSION VALUE) of a This variable to is RESET to an empty string.
1.1.3 Solve
Dump when adding parameters – Gtid-mode=off , similar to the following:
mysqldump-h1.1.1.1 -uuser - Ppassword -p3306 mydb mytb–where "Time <= cast (' 2014-04-03 16:00 ' as datetime ' –skip-lock-tables–default-character-set=utf8–gtid-mode=off > Mytb.txt
with mysql Workbench When exporting, you need to do the following:
1, Open Advanced Configuration:
650) this.width=650; "title=" 4 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" 4 "src=" http://s3.51cto.com/wyfs02/M00/80/70/ Wkiom1dbgawaayf5aabr9mqql9a184.png "width=" 410 "height="/>
2. Configuration -gtid-pruged parameter is OFF
650) this.width=650; "title=" 5 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" 5 "src=" http://s3.51cto.com/wyfs02/M00/80/6E/ Wkiol1dbgsurskzsaadipz7rxkk163.png "width=" 357 "height=" 283 "/>
and then export it OK up.
Mysql-error 1839