国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計 > 正文

mysql 5.7 disable GTID replication

2019-11-09 13:33:33
字體:
供稿:網(wǎng)友
MySQL 5.7 disable GTID replicationmysql 5.7.6及以后版本支持在線disable GTID replication,所以你可以使用傳統(tǒng)的方法或者在線方法 disable GTID replication一:傳統(tǒng)方法disable GTID replication參考 mysql 5.6 disable GTID replication

二:online disable GTID replication

1. Execute the following on each slave, and if you using multi-source replication, do it for each channel and include the FOR CHANNEL channel clause:

STOP SLAVE [FOR CHANNEL 'channel'];CHANGE MASTER TO MASTER_AUTO_POSITION = 0, MASTER_LOG_FILE = file, /MASTER_LOG_POS = position [FOR CHANNEL 'channel'];START SLAVE [FOR CHANNEL 'channel'];##如果你使用了多源復(fù)制,那么為每個channel執(zhí)行如上操作  

2. On each server, execute:

SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE;

3. On each server, execute:

SET @@GLOBAL.GTID_MODE = OFF_PERMISSIVE;

4. On each server, wait until the variable @@GLOBAL.GTID_OWNED is equal to the empty string. This can be checked using:

SELECT @@GLOBAL.GTID_OWNED;NOTE:On a replication slave, it is theoretically possible that this is empty and then nonempty again. This is not a PRoblem, it suffices that it is empty once

5. 備份

If you use binary logs for anything else than replication, for example to do point in time backup or restore: wait until you do not need the old binary logs having GTID transactions.如果你的binlog用于恢復(fù),在執(zhí)行完第四步后。在備份腳本所在實例執(zhí)行flush logs;并進(jìn)行一次全備

6. On each server, execute:

SET @@GLOBAL.GTID_MODE = OFF;

7. On each server, set gtid-mode=OFF in my.cnf.

在每個實例的配置文件中添加gtid-mode=OFF

8. 你也可以選擇設(shè)置enforce_gtid_consistency為OFF

set global enforce_gtid_consistency=OFF(同時在配置文件中添加)

參考鏈接:

http://blog.csdn.net/shaochenshuo/article/details/54862603http://blog.csdn.net/shaochenshuo/article/details/54138317http://blog.csdn.net/shaochenshuo/article/details/54138317http://dev.mysql.com/doc/mysql-replication-excerpt/5.6/en/replication-gtids-concepts.htmlhttp://dev.mysql.com/doc/mysql-replication-excerpt/5.7/en/replication-gtids-concepts.html?ff=nopfplshttps://dev.mysql.com/worklog/task/?spm=5176.100239.blogcont41200.6.xtY06T&id=7083http://dev.mysql.com/doc/refman/5.7/en/replication-mode-change-online-disable-gtids.html?ff=nopfpls


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 富川| 旬阳县| 平利县| 南平市| 庆云县| 房产| 奉化市| 井陉县| 莱西市| 龙里县| 株洲市| 长垣县| 西盟| 林芝县| 三明市| 库车县| 壤塘县| 新泰市| 安塞县| 宜春市| 太原市| 当雄县| 石景山区| 思南县| 永靖县| 建昌县| 武威市| 民丰县| 马鞍山市| 始兴县| 乾安县| 加查县| 筠连县| 四子王旗| 元氏县| 准格尔旗| 香河县| 梨树县| 河北区| 平乐县| 揭西县|