One, the source side
Add extract Extl,vam,begin Now
ADD exttrail F:oggmysqldirdatrl, EXTRACT EXTL
Edit params EXTL
Extract EXTL
Sourcedb Test@localhost:3306,userid Root,password Xifenfei
Exttrail F:oggmysqldirdatrl
Dynamicresolution
Gettruncates
Table test.t_1;
Add EXTRACT pump1, Exttrailsource F:oggmysqldirdatrl, BEGIN now
Add Rmttrail/ogg/mysql/dirdat/rl Extract PUMP1
Edit params PUMP1
Extract PUMP1
Rmthost 192.168.1.111,mgrport 7808
Rmttrail/ogg/mysql/dirdat/rl
PassThru
Gettruncates
Table test.t_1;
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/MySQL/
Two, Target side
Edit params./globals
Dblogin sourcedb Test@localhost:3306,userid Root,password Xifenfei
Checkpointtable Ogg.chkpoint
ADD checkpointtable Ogg.chkpoint
Add Replicat repl exttrail/ogg/mysql/dirdat/rl,begin now,checkpointtable ogg.chkpoint
Edit params Repl
Replicat REPL
Dboptions HOST 127.0.0.1, Connectionport 3306
Targetdb Test,userid Root,password Xifenfei
Assumetargetdefs
Reperror Default,discard
Discardfile/tmp/mysql.dsc,append,megabytes 100
Gettruncates
Map TEST. T_1, Target "test.t_1";
Iii. description
This example is the MySQL sync to Linux in win
There is a point to note:
1, add extract Extl,vam,begin now unlike Oracle Tranlog
2. Note the problem of Schema.tablename case in each parameter
1 win without distinction, all use lowercase will automatically convert to uppercase
2 in the replicate parameter, because the map is obtained from the data pump in win, the schema.tablename behind the map needs to capitalize
3 in the replicate parameter, because the table is Linux in the corresponding database name and table name (mysql is stored in file form, generally lowercase), so the map after the schema.tablename need lowercase + double quotes, to prevent uppercase
3, attention to MySQL database coding
Iv. Differences with Oracle
1, Login
Dblogin sourcedb Dbname@localhost:3306,userid Root,password Xifenfei
2, extract access to MySQL
Sourcedb Dbname@localhost:3306,userid Root,password Xifenfei
3, replicat access to MySQL
Dboptions HOST 127.0.0.1, Connectionport 3306
Targetdb Dbname,userid Root,password Xifenfei