# MySQL address, user and password
# user must have replication privilege in MySQL.
my_addr = "127.0.0.1:3306"
my_user = "root"
my_pass = "数据库密码" # Elasticsearch address
es_addr = "Elasticsearch的IP地址:9200" # Path to store data, like master.info, and dump MySQL data
data_dir = "./var" # Inner Http status address
stat_addr = "127.0.0.1:12800" # pseudo server id like a slave
<span style="color: #ff0000;">server_id = 1001 #此ID必须与上面的server_id一致</span> # mysql or mariadb
flavor = "mysql" # mysqldump execution path
# if not set or empty, ignore mysqldump.
mysqldump = "mysqldump" # MySQL data source
[[source]]
schema = "torrent" #数据库名 # Only below tables will be synced into Elasticsearch.
# "test_river_[0-9]{4}" is a wildcard table format, you can use it if you have many sub tables, like table_0000 - table_1023
# I don't think it is necessary to sync all tables in a database.
# 这里就是需要添加索引的表
tables = ["torrent[0-9]{1}","torrenta","torrentb","torrentc","torrentd","torrente","torrentf"] # Below is for special rule mapping
[[rule]]
schema = "torrent" # 数据库名
table = "torrent[0-9]{1}" # 表名
index = "torrent" # 索引名,跟之前程序创立的一致即可 [[rule]]
schema = "torrent"
table = "torrenta"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentb"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentc"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentd"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrente"
index = "torrent" [[rule]]
schema = "torrent"
table = "torrentf"
index = "torrent"

./bin/go-mysql-elasticsearch -config=./etc/river.toml

etc/river.toml的更多相关文章

  1. elasticsearch搭建并通过go-mysql-elasticsearch同步db数据达到搜索引擎的目的

    logstash-input-jdbc/elasticsearch-jdbc缺点:删除记录没有办法同步,只能两边执行自己的删除命令,版本16年后未更新. go-mysql-elasticsearch缺 ...

  2. ElasticSearch 安装 go-mysql-elasticsearch 同步mysql的数据

    一.首先在Centos6.5上安装 go 语言环境 下载Golang语言包:https://studygolang.com/dl [hoojjack@localhost src]$ ls apache ...

  3. mysql数据实时同步到Elasticsearch

    业务需要把mysql的数据实时同步到ES,实现低延迟的检索到ES中的数据或者进行其它数据分析处理.本文给出以同步mysql binlog的方式实时同步数据到ES的思路, 实践并验证该方式的可行性,以供 ...

  4. laravel5+ElasticSearch+go-mysql-elasticsearch MySQL数据实时导入(mac)

    1. ElasticSearch安装 直接使用brew install elasticsearch 安装最新版本的es,基本没有障碍. 2.Laravel5 框架添加elasticsearch支持 在 ...

  5. 使用go-mysql-elasticsearch同步mysql数据库信息到ElasticSearch

    本文介绍如何使用go-mysql-elasticsearch同步mysql数据库信息到ElasticSearch. 1.go-mysql-elasticsearch简介 go-mysql-elasti ...

  6. 几篇关于MySQL数据同步到Elasticsearch的文章---第四篇:使用go-mysql-elasticsearch同步mysql数据库信息到ElasticSearch

    文章转载自: https://www.cnblogs.com/dalaoyang/p/11018541.html 1.go-mysql-elasticsearch简介 go-mysql-elastic ...

  7. Moon River

    读书笔记系列链接地址http://www.cnblogs.com/shoufengwei/p/5714661.html.        昨晚无意中听到了一首英文歌曲,虽不知其意,但是瞬间就被优美的旋律 ...

  8. poj[3093]Margaritas On River Walk

    Description One of the more popular activities in San Antonio is to enjoy margaritas in the park alo ...

  9. Crossing River

    Crossing River 题目链接:http://acm.hust.edu.cn/vjudge/problem/visitOriginUrl.action?id=26251 题意: N个人希望去过 ...

随机推荐

  1. 关于弹性布局flex

    什么时候使用flex布局? 当页面排版涉及左右浮动.垂直居中等时,应使用flex布局来避免传统的盒式布局带来的一些Bug. 如何使用flex布局? 在目标元素的父元素设置csss属性.display: ...

  2. 【机器学习】梯度下降 II

    Gradient Descent 梯度下降 II 关于 Gradient Descent 的直观解释,参考上一篇博客[机器学习]梯度下降 I 本模块介绍几种梯度下降模型.定义符号标记如下: \(\th ...

  3. 基于bellman-ford算法使用队列优化的spfa求最短路O(m),最坏O(n*m)

    acwing851-spfa求最短路 #include<iostream> #include<cstring> #include<algorithm> #inclu ...

  4. dubbo学习(三)配置dubbo API方式配置

    provider(生产者) import com.alibaba.dubbo.config.ApplicationConfig; import com.alibaba.dubbo.config.Pro ...

  5. CSS3 新特性总结

    1.边框 border-radius: 1-4 length|% / 1-4 length|%; 每个半径的四个值的顺序是:左上角,右上角,右下角,左下角.若省略左下角,和右上角相同,省略右下角,左上 ...

  6. 逻辑漏洞介绍 & 越权访问攻击 & 修复建议

    介绍逻辑漏洞 逻辑漏洞就是指攻击者利用业务的设计缺陷,获取敏感信息或破坏业务的完整性.一般出现在密码修改.越权访问.密码找回.交易支付金额等功能处.其中越权访问又有水平越权和垂直越权两种,如下所示. ...

  7. 如何修改MySQL数据库名称

    比如数据库名称old_db想改名为new_db MySQL修改数据库名称比较麻烦,不支持直接修改,需要通过其它方式间接达到修改数据库名称的目的. 在 MySQL 5.1.23 之前的旧版本中,我们可以 ...

  8. Python-随机模块-random

    random 生成随机变量 生成 [0, 1) 随机数 .random import random random_number = random.random() print(random_numbe ...

  9. Python-输入输出-input ouput

    输入.输出? 这种统称为IO流,也就是数据流向,在标准中,从终端输入称为标准输入 sidin,从终端输出为标准输出 stdout,从终端错误输出则为标准错误输出 stderr.这些只是IO流中终端方面 ...

  10. Go-archive/tar: write after close gopher.txt

    where? 在使用Go中tar包循环写入内容的时候 why? 因为已经关闭了tar.writer对象,所以无法写入,但是程序还是有写入操作,所以报错 way? 通过 defer关键字来管理资源的释放 ...