1.备份数据
mysqldump -uroot -p --all-databases --single-transaction --triggers --routines --events > /opt/backup/onlinedata-backup/2020-01-17/slave-01-2020-01-17.sql

  2.从备份数据中获取 GTID_PURGED

 # grep GTID_PURGED /tmp/alldb.sql 
 SET @@GLOBAL.GTID_PURGED='31d7e420-69a7-11e8-a75c-00163e0684c7:1-9199686819

  3.导入数据

  4.重置主从

    reset master

    reset slave all

  5.配置主从

   

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
猜你喜欢
  • 2022-03-08
  • 2022-12-23
  • 2021-11-16
  • 2021-07-22
  • 2022-01-02
  • 2021-08-13
  • 2022-12-23
相关资源
相似解决方案