i try to use GTID and backdump mysql -u root -h xx.xxx.xxx.xx -p < 2015-10-30_all_database.sql Enter password: ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.
and i check the slave server
show global variables like 'gtid_executed';
| Variable_name | Value |
| gtid_executed | 19718ded-7eca-11e5-bece-00163e001216:1-2 |
show global variables like 'gtid_purged';
| Variable_name | Value |
| gtid_purged | |
while the master is show global variables like 'gtid_executed';
| Variable_name | Value |
| gtid_executed | |
show global variables like 'gtid_purged' -> ;
| Variable_name | Value |
| gtid_purged | |
i check slave log
#151030 16:12:52 server id 2 end_log_pos 219 CRC32 0xf7210a68 GTID last_committed=0 sequence_number=1
SET @@SESSION.GTID_NEXT= '19718ded-7eca-11e5-bece-00163e001216:1'/*!*/;
# at 219
#151030 16:12:52 server id 2 end_log_pos 366 CRC32 0xd6c11bfa Query thread_id=2 exec_time=0 error_code=0
SET TIMESTAMP=1446192772/*!*/;
SET @@session.pseudo_thread_id=2/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1436549152/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE USER 'root'@'xxx.xxx.xxx.xxx' IDENTIFIED WITH 'mysql_native_password'
/*!*/;
# at 366
#151030 16:14:44 server id 2 end_log_pos 431 CRC32 0x0682aa9d GTID last_committed=1 sequence_number=2
SET @@SESSION.GTID_NEXT= '19718ded-7eca-11e5-bece-00163e001216:2'/*!*/;**
# at 431
#151030 16:14:44 server id 2 end_log_pos 564 CRC32 0x25289918 Query thread_id=2 exec_time=0 error_code=0
SET TIMESTAMP=1446192884/*!*/;
GRANT SUPER ON *.* TO 'root'@'xxx.xxx.xxx.xxx'
/*!*/;
SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
i CREATE USER and grant to master host root,these generated gtid_executed,but the master have not.
i try reset slave;
but the result not change.
how to execute the 2015-10-30_all_database.sql to slave?
and then use GTID to replication.