知乎专栏 |
问题出现在 MySQL 5.7 导入数据库时候
[www@testing ~]$ zcat netkiller.2021-08-19.sql.gz | mysql netkiller ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.
解决方案
执行 reset master;
[www@testing ~]$ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 25669 Server version: 5.7.35 MySQL Community Server (GPL) Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> reset master; Query OK, 0 rows affected (0.01 sec) mysql> exit Bye [www@testing ~]$ zcat netkiller.2021-08-19.sql.gz | mysql netkiller