mysql goldengate同步 簡單配置
----主機資訊
os:cent os 6.5
host: ct6505/192.108.56.115
ct6506/192.108.56.116
MySQL:5.6.24
Goldengate:12.1.2
----安裝MySQL
--ct6505,ct6506
[root@ct6505/6 ~]# yum remove mysql-libs-5.1.71-1.el6.x86_64
[root@ct6505/6 ~]# yum install libaio
[root@ct6505/6 ~]# yum install perl
[root@ct6505/6 ~]# ls MySQL-*
MySQL-client-advanced-5.6.24-1.el6.x86_64.rpm
MySQL-server-advanced-5.6.24-1.el6.x86_64.rpm
[root@ct6505/6 ~]# rpm -ivh MySQL-*
----配置MySQL
--ct6505,ct6506
[root@ct6505/6 mysql]# cat /usr/my.cnf
[mysqld]
log_bin=/var/lib/mysql/mysql01.log
log_error=/var/lib/mysql/mysql01.err
innodb_flush_log_at_trx_commit=1
sync_binlog=1
binlog_format=row
innodb_support_xa=1
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[root@ct6505/6 ~]# mysql -uroot -p
mysql> SET PASSWORD = PASSWORD('system');
mysql> use mysql;
mysql> update user set host='%' where host='localhost';
mysql> flush privileges;
mysql> create table test.test1(a int); --測試同步用
--ct6506
mysql> create database ogg;
--ct6505,ct6506
[root@ct6505/6 ~]#ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
----安裝goldendate
--ct6505,ct6506
[root@ct6505/6 ggmysql]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.108.56.115 ct6505
192.108.56.116 ct6506
[root@ct6505/6 ~]# mkdir /ggmysql
[root@ct6505/6 ~]# mv ggs_Linux_x64_MySQL_64bit.tar /ggmysql/
[root@ct6505/6 ~]# cd /ggmysql/
[root@ct6505/6 ggmysql]# tar -xvf ggs_Linux_x64_MySQL_64bit.tar
----配置goldengate
--ct6505
[root@ct6505 ggmysql]# ./ggsci
GGSCI (ct6505) 1> create subdirs
GGSCI (ct6505) 2> edit params mgr
port 7809
DYNAMICPORTLIST 7840-7940
GGSCI (ct6505) 3> add extract ext1,vam,begin now
GGSCI (ct6505) 4> add exttrail /ggmysql/dirdat/r1,extract ext1
GGSCI (ct6505) 5> edit params ext1
extract ext1
sourcedb test@localhost:3306,userid root,password system
tranlogoptions altlogdest /var/lib/mysql/mysql01.index
exttrail /ggmysql/dirdat/r1
dynamicresolution
gettruncates
table test.*;
GGSCI (ct6505) 6> add extract pump1,exttrailsource /ggmysql/dirdat/r1,begin now
GGSCI (ct6505) 7> add rmttrail /ggmysql/dirdat/r1 extract pump1
GGSCI (ct6505) 8> edit params pump1
extract pump1
rmthost 192.108.56.116,mgrport 7809
rmttrail /ggmysql/dirdat/r1
passthru
gettruncates
table test.*;
GGSCI (ct6506) 9> start mgr
GGSCI (ct6506) 10> start ext1
GGSCI (ct6506) 11> start pump1
GGSCI (ct6506) 12> info all
--ct6506
[root@ct6506 ggmysql]# ./ggsci
GGSCI (ct6506) 1> create subdirs
GGSCI (ct6506) 2> edit params ./GLOBALS
checkpointtable ogg.chkpoint
GGSCI (ct6506) 3> edit params mgr
port 7809
DYNAMICPORTLIST 7840-7940
GGSCI (ct6506) 4> dblogin sourcedb test@192.108.56.116:3306,userid root,password system
GGSCI (ct6506) 5> add checkpointtable ogg.chkpoint
GGSCI (ct6506) 6> add replicat rep1 exttrail /ggmysql/dirdat/r1,begin now,checkpointtable ogg.chkpoint
GGSCI (ct6506) 7> edit params rep1
replicat rep1
dboptions host localhost,connectionport 3306
targetdb test,userid root,password system
assumetargetdefs
reperror default,discard
discardfile /ggmysql/dirrpt/b_rep1.dsc, APPEND, MEGABYTES 100
gettruncates
map test.*,target test.*;
GGSCI (ct6506) 8> start mgr
GGSCI (ct6506) 9> start rep1
GGSCI (ct6506) 10> info all
os:cent os 6.5
host: ct6505/192.108.56.115
ct6506/192.108.56.116
MySQL:5.6.24
Goldengate:12.1.2
----安裝MySQL
--ct6505,ct6506
[root@ct6505/6 ~]# yum remove mysql-libs-5.1.71-1.el6.x86_64
[root@ct6505/6 ~]# yum install libaio
[root@ct6505/6 ~]# yum install perl
[root@ct6505/6 ~]# ls MySQL-*
MySQL-client-advanced-5.6.24-1.el6.x86_64.rpm
MySQL-server-advanced-5.6.24-1.el6.x86_64.rpm
[root@ct6505/6 ~]# rpm -ivh MySQL-*
----配置MySQL
--ct6505,ct6506
[root@ct6505/6 mysql]# cat /usr/my.cnf
[mysqld]
log_bin=/var/lib/mysql/mysql01.log
log_error=/var/lib/mysql/mysql01.err
innodb_flush_log_at_trx_commit=1
sync_binlog=1
binlog_format=row
innodb_support_xa=1
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[root@ct6505/6 ~]# mysql -uroot -p
mysql> SET PASSWORD = PASSWORD('system');
mysql> use mysql;
mysql> update user set host='%' where host='localhost';
mysql> flush privileges;
mysql> create table test.test1(a int); --測試同步用
--ct6506
mysql> create database ogg;
--ct6505,ct6506
[root@ct6505/6 ~]#ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
----安裝goldendate
--ct6505,ct6506
[root@ct6505/6 ggmysql]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.108.56.115 ct6505
192.108.56.116 ct6506
[root@ct6505/6 ~]# mkdir /ggmysql
[root@ct6505/6 ~]# mv ggs_Linux_x64_MySQL_64bit.tar /ggmysql/
[root@ct6505/6 ~]# cd /ggmysql/
[root@ct6505/6 ggmysql]# tar -xvf ggs_Linux_x64_MySQL_64bit.tar
----配置goldengate
--ct6505
[root@ct6505 ggmysql]# ./ggsci
GGSCI (ct6505) 1> create subdirs
GGSCI (ct6505) 2> edit params mgr
port 7809
DYNAMICPORTLIST 7840-7940
GGSCI (ct6505) 3> add extract ext1,vam,begin now
GGSCI (ct6505) 4> add exttrail /ggmysql/dirdat/r1,extract ext1
GGSCI (ct6505) 5> edit params ext1
extract ext1
sourcedb test@localhost:3306,userid root,password system
tranlogoptions altlogdest /var/lib/mysql/mysql01.index
exttrail /ggmysql/dirdat/r1
dynamicresolution
gettruncates
table test.*;
GGSCI (ct6505) 6> add extract pump1,exttrailsource /ggmysql/dirdat/r1,begin now
GGSCI (ct6505) 7> add rmttrail /ggmysql/dirdat/r1 extract pump1
GGSCI (ct6505) 8> edit params pump1
extract pump1
rmthost 192.108.56.116,mgrport 7809
rmttrail /ggmysql/dirdat/r1
passthru
gettruncates
table test.*;
GGSCI (ct6506) 9> start mgr
GGSCI (ct6506) 10> start ext1
GGSCI (ct6506) 11> start pump1
GGSCI (ct6506) 12> info all
--ct6506
[root@ct6506 ggmysql]# ./ggsci
GGSCI (ct6506) 1> create subdirs
GGSCI (ct6506) 2> edit params ./GLOBALS
checkpointtable ogg.chkpoint
GGSCI (ct6506) 3> edit params mgr
port 7809
DYNAMICPORTLIST 7840-7940
GGSCI (ct6506) 4> dblogin sourcedb test@192.108.56.116:3306,userid root,password system
GGSCI (ct6506) 5> add checkpointtable ogg.chkpoint
GGSCI (ct6506) 6> add replicat rep1 exttrail /ggmysql/dirdat/r1,begin now,checkpointtable ogg.chkpoint
GGSCI (ct6506) 7> edit params rep1
replicat rep1
dboptions host localhost,connectionport 3306
targetdb test,userid root,password system
assumetargetdefs
reperror default,discard
discardfile /ggmysql/dirrpt/b_rep1.dsc, APPEND, MEGABYTES 100
gettruncates
map test.*,target test.*;
GGSCI (ct6506) 8> start mgr
GGSCI (ct6506) 9> start rep1
GGSCI (ct6506) 10> info all
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28539951/viewspace-1721809/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【GoldenGate】Oracle GoldenGate(一) 安裝與DML單向同步配置GoOracle
- 【GoldenGate】Oracle GoldenGate(三) DDL同步配置GoOracle
- GoldenGate雙向同步配置Go
- 【GoldenGate】Oracle GoldenGate(二) 雙向同步配置GoOracle
- Goldengate單表新增同步Go
- mysql cluster 簡單配置MySql
- GoldenGate單向表DML同步Go
- 【OGG】Oracle GoldenGate 11g (二) GoldenGate 11g 單向同步配置 上OracleGo
- 【OGG】Oracle GoldenGate 11g (二) GoldenGate 11g 單向同步配置 下OracleGo
- mysql_to_mysql的gg簡單配置MySql
- oracle資料庫配置goldengate同步Oracle資料庫Go
- Window 10 單機配置MYSQL主從同步MySql主從同步
- Linux下GoldenGate單機單向同步LinuxGo
- 配置GoldenGate增量資料同步機制Go
- 使用goldengate從mysql同步資料到oracleGoMySqlOracle
- goldengate 單向複製配置Go
- Mysql半同步配置MySql
- 配置GoldenGate啟動DDL支援同步DDL操作Go
- 配置支援DML和DDL操作同步的GoldenGateGo
- Oracle GoldenGate 簡單實驗OracleGo
- GoldenGate配置(一)之單向複製配置Go
- canal同步mysql,監聽單例項,多例項配置MySql單例
- Linux下GoldenGate單機雙向同步LinuxGo
- goldengate單向複製的配置Go
- 簡單配置mysql的主從複製MySql
- keepalived+mysql+centos6.4 簡單配置MySqlCentOS
- Mysql 主-主簡單配置 --centos6.4MySqlCentOS
- Mysql 主-從簡單配置---centos6.4MySqlCentOS
- MySQL主從同步配置MySql主從同步
- 簡單理解同步與非同步非同步
- Oracle GoldenGate 異構平臺同步(Mysql到Oracle)OracleGoMySql
- Mysql主主同步-配置資料同步MySql
- Mysql ndb-cluster centos6.4 簡單配置MySqlCentOS
- GoldenGate BR(bounded Recovery)簡單說明Go
- Oracle GoldenGate系統之----單向同步資料表OracleGo
- Mysql Master-slave複製簡單配置記錄MySqlAST
- goldengate 12.3 實現mysql資料及DDL實時同步GoMySql
- GoldenGate簡單複製環境的搭建Go