MySQl报错之@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON
方法一:在目标mysql上执行如下命令
1.进入mysql 执行 reset master;
mysql> reset master
-> ;
Query OK, 0 rows affected (0.03 sec)
mysql> exit;
Bye
方法二:到导入时添加参数-f
Warning: Using a password on the command line interface can be insecure.
ERROR 1839 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON.
报错原因是原数据库里开了gtid,需要在mysqldump语句里指定--set-gtid-purged=on参数;
在导入的时候加入-f参数即可,例如:
mysql -uroot -pSunstar2012Hecom888ser8686 -h47.93.xx.xx -f cus_DEMO < /alidata1/backup/gl/gl/cus_DEMO_gl.sql
转载:http://blog.itpub.net/20893244/viewspace-2138125/