# 如何重置同步位置(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數據庫
- 簡介
- 部署運行
- 高可用集群
- 同步數據到Redis
- Redis配置
- 基于規則同步
- 基于Lua腳本同步
- 同步數據到MongoDB
- MongoDB配置
- 基于規則同步
- 基于Lua腳本同步
- 同步數據到RocketMQ
- RocketMQ配置
- 基于規則同步
- 基于Lua腳本同步
- 同步數據到Kafka
- Kafka配置
- 基于規則同步
- 基于Lua腳本同步
- 同步數據到RabbitMQ
- RabbitMQ配置
- 基于規則同步
- 基于Lua腳本同步
- 同步數據到Elasticsearch
- Elasticsearch配置
- 基于規則同步
- 基于Lua腳本同步
- 全量數據導入
- Lua腳本
- 基礎模塊
- Json模塊
- HttpClient模塊
- DBClient模塊
- 監控
- 性能測試
- 常見問題
- 更新記錄開發計劃