# 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. redis之哨兵部署运行日志解读

    转载自http://www.run-debug.com/?p=674 192.168.110.21 主 192.168.110.31 从 #两台服务器都安装redis #下载最新稳定版本:http:/ ...

  2. hystrix文档翻译之开始使用

    获取包 使用maven获取包. <dependency> <groupId>com.netflix.hystrix</groupId> <artifactId ...

  3. element-ui upload上传文件并携带参数 使用formData对象

    需求:上传文件的时候,需要携带其他的参数 问题:使用upload上传文件时,必须使用formData对象,而其他的参数通过data获取的到的,formData和data是不能同时传输的 解决:获取到的 ...

  4. 静态代理、jdk动态代理、cglib动态代理

    一.静态代理 Subject:抽象主题角色,抽象主题类可以是抽象类,也可以是接口,是一个最普通的业务类型定义,无特殊要求. RealSubject:具体主题角色,也叫被委托角色.被代理角色.是业务逻辑 ...

  5. Centos-切换用户身份-su

    su 切换用户身份 相关选项 - 加载相应用户下环境变量 -c   使用某个身份执行一个指令 -m  改变用户身份不改变环境变量 切换为超级用户 su - 普通用户切换为超级用户需要输入密码,超级用户 ...

  6. 李宏毅老师机器学习第一课Linear regression

    机器学习就是让机器学会自动的找一个函数 学习图谱: 1.regression example appliation estimating the combat power(cp) of a pokem ...

  7. Python练习题 032:Project Euler 004:最大的回文积

    本题来自 Project Euler 第4题:https://projecteuler.net/problem=4 # Project Euler: Problem 4: Largest palind ...

  8. 无所不能的Embedding 2. FastText词向量&文本分类

    Fasttext是FaceBook开源的文本分类和词向量训练库.最初看其他教程看的我十分迷惑,咋的一会ngram是字符一会ngram又变成了单词,最后发现其实是两个模型,一个是文本分类模型[Ref2] ...

  9. CF600E Lomsat gelral 树上启发式合并

    题目描述 有一棵 \(n\) 个结点的以 \(1\) 号结点为根的有根树. 每个结点都有一个颜色,颜色是以编号表示的, \(i\) 号结点的颜色编号为 \(c_i\)​. 如果一种颜色在以 \(x\) ...

  10. Github 太狠了,居然把 "master" 干掉了!

    前段时间栈长有看到 Github 和 master 分支变更的新闻,当时没有注意细节,直到今天我创建仓库时: 看了半天感觉有点不对劲啊... 怎么 master 不见了,之前默认主干分支名称都是叫 m ...