通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
# 如何重置同步位置(Position) 1、停掉go-mysql-transfer应用 2、在数据库执行 show master status语句,会看到结果如下: <table> <thead> <tr> <th width="25%">File</th> <th width="25%">Position</th> <th width="25%">Binlog-Do-DB</th> <th width="25%">Binlog-Ignore-DB</th> </tr> </thead> <tbody> <tr> <td>mysql-bin.000025</td> <td>993779648</td> <td></td> <td></td> </tr> </tbody> </table> 3、使用File和Position列的值 执行命令: ./go-mysql-transfer -config app.yml -position mysql-bin.000025 993779648 4、重启应用: ./go-mysql-transfer -config app.yml # 如何同步多张表 使用yml的数组语法: ``` #一组连词线开头的行,构成一个数组 animal: - Cat - Dog - Goldfish ``` go-mysql-transfer支持单库多表,也支持多库多表,配置如下: ~~~ rule: - schema: eseap #数据库名称 table: t_user #表名称 column_underscore_to_camel: true value_encoder: json redis_structure: string redis_key_prefix: USER_ - schema: eseap #数据库名称 table: t_sign #表名称 column_underscore_to_camel: true value_encoder: json redis_structure: string redis_key_prefix: SIGN_ - schema: gojob #数据库名称 table: t_triggered #表名称 column_underscore_to_camel: true value_encoder: json redis_structure: string redis_key_prefix: TRIGGERED_ ~~~ t_user表和t_sign表属于eseap数据库,t_triggered表属于gojob数据库