Comments (24)
can you insert some data and then flush logs, the mysql binlog will be rotated and go-mysql-elasticsearch will log this.
from go-mysql-elasticsearch.
Hi @itarafath
Do you have a users
table in test
database?
from go-mysql-elasticsearch.
Yes..available.
from go-mysql-elasticsearch.
Thanks . It works . But sync only newly inserted data, existing data are missing.
from go-mysql-elasticsearch.
can you use select * from users
to see the existing data which are not synced?
from go-mysql-elasticsearch.
it won't work. Where can I find MySQL dump? Below I attached screenshot
from go-mysql-elasticsearch.
seem that you don't install mysqldump, so go-mysql-elesticsearch can't sync the data which does not exist in binlog.
mysqldump is contained in MySQL, maybe you can install it? Sorry that I have no Windows computer so I don't know how to do it.
from go-mysql-elasticsearch.
MySQL dump is working fine. Is there any specific path for MySQL dump file.
Which folder should contain MySQL dump file? It should be SQL or CSV?
from go-mysql-elasticsearch.
We don't save dump file, just dump the data from MySQL and sync to ES with a Pipe.
from go-mysql-elasticsearch.
If I run mysqldump dbName
it's working. Then what should be wrong?
from go-mysql-elasticsearch.
Delete the data directory set in data_dir
configuration and restart the again. Hope this can solve your problem.
from go-mysql-elasticsearch.
No :( . Not worked.
from go-mysql-elasticsearch.
Can you show me the console output?
from go-mysql-elasticsearch.
from go-mysql-elasticsearch.
seem that you find the user with id 11?
from go-mysql-elasticsearch.
Yeah. That's newly inserted one. But existing data are missing.
from go-mysql-elasticsearch.
what is your existing data? can you show me an example, like selecting the result in MySQL and then in ES?
from go-mysql-elasticsearch.
from go-mysql-elasticsearch.
how about curl -XGET "http://localhost:9200/users/user/1"
or curl -XGET "http://localhost:9200/users/user/11"
from go-mysql-elasticsearch.
from go-mysql-elasticsearch.
very strange. I will dive this issue later.
Can you show me the user table schema in MySQL.
What's your MySQL version, your ES version?
from go-mysql-elasticsearch.
MySQL : 5.6.21
ES : 5.0.0
Table Schema
CREATE TABLE
a(
idint(11) NOT NULL AUTO_INCREMENT,
namevarchar(30) NOT NULL DEFAULT '', PRIMARY KEY (
id) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
from go-mysql-elasticsearch.
Hi @itarafath
I use your config and data to test in my Mac OSX. But to my surprised, it works ok.
-
Create the table
a
and insert(1, name1)
and(2, name2)
. -
Use
reset master
to force MySQL clear its binlog. -
Start go-mysql-elasticsearch with your configuration.
➜ go-mysql-elasticsearch git:(master) ✗ ./bin/go-mysql-elasticsearch -config etc/river.toml 2016/11/10 20:21:44 binlogsyncer.go:71: [info] create BinlogSyncer with config &{1001 mysql 127.0.0.1 3306 root false false} 2016/11/10 20:21:44 dump.go:108: [info] try dump MySQL and parse 2016/11/10 20:21:44 status.go:52: [info] run status http server 127.0.0.1:12800 mysqldump: [Warning] Using a password on the command line interface can be insecure. 2016/11/10 20:21:45 dump.go:114: [info] dump MySQL and parse OK, use 1.29 seconds, start binlog replication at (mysql.000001, 154) 2016/11/10 20:21:45 sync.go:17: [info] start sync binlog at (mysql.000001, 154) 2016/11/10 20:21:45 binlogsyncer.go:226: [info] begin to sync binlog from position (mysql.000001, 154) 2016/11/10 20:21:45 binlogsyncer.go:130: [info] register slave for master server 127.0.0.1:3306 2016/11/10 20:21:45 binlogsyncer.go:552: [info] rotate to (mysql.000001, 154) 2016/11/10 20:21:45 sync.go:53: [info] rotate binlog to (mysql.000001, 154)
-
Select in ES
curl -XGET "http://localhost:9200/users/user/1" {"_index":"users","_type":"user","_id":"1","_version":1,"found":true,"_source":{"id":1,"name":"name1"}}
-
Insert
(3, name3)
and select in EScurl -XGET "http://localhost:9200/users/user/3" {"_index":"users","_type":"user","_id":"3","_version":1,"found":true,"_source":{"id":3,"name":"name3"}}
I use MySQL 5.7.16 and ES 5.0.0.
I don't know what is wrong in your test now......
from go-mysql-elasticsearch.
@siddontang Ok. I will try . Thanks for your support . 👍
from go-mysql-elasticsearch.
Related Issues (20)
- 列转化为field时没有自动分词 HOT 1
- 同步多表怎么写配置 HOT 1
- Sync error consider adding an alarm
- 同步过程中服务老是出现停的情况,错误 [error] river.go:315 start canal err ERROR 1236 (HY000): A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000470' at 775402324, the last event read from './mysql-bin.000470' at 882910125, the last byte read from './mysql-bin.000470' at 882910125. HOT 1
- es 7 使用 Parent-Child Relationship
- how can I sync mysql which in docker container to elasticsearch?
- binlog error on restart (invalid character 'R' after top-level value)
- 执行exe同步报错 invalid sequence 8!=1 HOT 2
- 多个子表聚合到一个index
- 能支持dockerfile
- 能否同步one-many嵌套表作为对象关联 到es中?需要怎么配置
- 无法实现同步
- 你好,同步报错如下:sync.go:156 do ES bulk err invalid character '<' looking for beginning of value, close sync HOT 1
- mysql8 mysqldump出错 HOT 1
- 阿里云/腾讯云 mysql to es WITH MAX_USER_CONNECTIONS 10000 HOT 1
- mysql,datetime字段同步到ES的date字段,会变成加8时区的格式 HOT 1
- How do I connect to an ES cluster HOT 1
- Startup error
- start canal err line 1 column 29 near "ON *.* FROM 'root'@'%'"
- go mod tidy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-mysql-elasticsearch.