binlog的sql命令:

SHOW VARIABLES LIKE 'log_%';  查询各种log是否开启

SHOW MASTER STATUS; 查询当前binlog文件position状态

SHOW BINLOG EVENTS; 查看binlog日志记录情况,每组position位置做了哪些操作,也需要开启binlog-format=Row配置参数来支持

 

binlog客户端命令:

mysqlbinlog mysql-bin.000001 --start-position 120 --stop-position 578|mysql -uroot -p   用于依据binlog文件,进行数据恢复

从库中使用命令指向主库:

change master to master_host='127.0.0.1',master_port=3308,master_user='root',master_password='123456',master_log_file='mysql-bin.000001',master_log_pos=0

 

相关文章:

  • 2021-10-20
  • 2022-01-13
  • 2021-06-20
  • 2021-08-04
  • 2021-07-10
  • 2021-12-20
  • 2022-12-23
  • 2021-09-21
猜你喜欢
  • 2022-01-11
  • 2022-01-09
  • 2021-09-07
  • 2021-09-19
  • 2021-06-05
  • 2021-11-29
  • 2021-04-19
相关资源
相似解决方案