Oracle to MySQL test has always been a garbled problem can not be resolved, and then exchanges with colleagues, he said that Oracle use OGG 11g version, MySQL use ogg 10g version can solve the garbled problem, at first I still doubt, because I think the new version is not good, Could the old version solve the problem? Holding to try the attitude, did a test, the success of the experiment, the relevant situation recorded
MySQL parameter configuration (CAT/ETC/MY.CNF):
[Client]
Default-character-set = GBK
[Mysqld]
lower_case_table_names=1– table names are case-insensitive (the province is not able to due to case problems in the REPL process)
Character-set-server = GBK
Table/Column encoding: All GBK
Note:
1. Since MySQL is the target, there is no requirement for Log-bin/binlog_format parameters
2, through the above settings to ensure that all MySQL related coding is GBK
System encoding Configuration (cat/etc/sysconfig/i18n):
Source
Lang= "ZH_CN. GBK "
Supported= "Zh_CN.GBK:zh_CN:zh"
Sysfont= "Latarcyrheb-sun16″
Target
Lang= "ZH_CN. GBK "
Sysfont= "Latarcyrheb-sun16″
Note: Yes, the system code is the same as the MySQL code
Ogg configuration process:
SOURCE End:
Add extract Ext-all,tranlog,begin Now
ADD Exttrail/opt/ogg/dirdat/extract/al, extract Ext-all
Edit params Ext-all
Extract Ext-all
Setenv (Nls_lang =american_america. ZHS16GBK)
UserID Is1ogg,password Passw0rd
Exttrail/opt/ogg/dirdat/extract/al
Discardfile/opt/ogg/discard/ext-all.txt, append, megabytes 100
DDL INCLUDE mapped optype alter objname ECP. tab*
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/MySQL/
TABLE ecp.*;
Add EXTRACT P-air, Exttrailsource/opt/ogg/dirdat/extract/al, BEGIN now
Add Rmttrail/opt/ogg/dirdat/rl Extract P-air
Edit params P-air
Extract P-air
Setenv (Nls_lang =american_america. ZHS16GBK)
UserID Is1ogg,password Passw0rd
Rmthost 192.168.1.4,mgrport 7809,tcpbufsize 100000,tcpflushbytes 300000
Rmttrail/opt/ogg/dirdat/rl
Discardfile/opt/ogg/discard/p-air.txt, append, megabytes 100
TABLE ecp.*;
Target End:
Add Replicat repl, Exttrail/opt/ogg/dirdat/rl,nodbcheckpoint
Edit params Repl
Replicat REPL
Dboptions HOST 127.0.0.1, Connectionport 3306
Targetdb Ecp,userid Root,password Xifenfei
Assumetargetdefs
Reperror Default,discard
Discardfile/tmp/mysql.dsc,append,megabytes 100
MAP ECP. Tab_uum_dept, TARGET ecp.tab_uum_dept;
MAP ECP. Tab_uum_dept_leader, TARGET Ecp.tab_uum_dept_leader;