1. 程式人生 > >linux上msyql主從複製gtid,主從全部重啟後(兩個no)

linux上msyql主從複製gtid,主從全部重啟後(兩個no)

解決辦法:
1:先到主庫上檢視偏移量(Position)
mysql> show master status;
+------------------+----------+--------------+------------------+----------------------------------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set                            |
+------------------+----------+--------------+------------------+----------------------------------------------+
| mysql-bin.000014 |      191 |              |                  | 03969184-0807-11e9-9734-001e67f4efb0:1-25434 |
+------------------+----------+--------------+------------------+----------------------------------------------+
1 row in set (0.00 sec)
2:再在從庫上操作
reset slave;
change master to master_host='192.168.116.101', master_user='zzh', master_password='123456',master_port=3306,master_auto_position=191;
start slave;