Comments (39)
你需要设置mysql的binglog配置,不能用配置文件自带的,在mysql执行:
show master status
from synch.
只需要改一下ini文件吗?需要刷新么,我改了之后新的配置没有起作用。需要重启吗?
from synch.
需要重启
from synch.
能不能支持从多个不同数据库同步表啊?
我这个是在服务器上面,重启机器不可以的。
from synch.
我以前的版本要更新到最新有什么办法吗?
from synch.
重启mysql2ch不是重启机器,不同数据库实例建立多个配置文件
from synch.
mysql2ch 没有重启命令啊,只有etl,produce,consume
from synch.
你可以记录binlog位置,升级mysql2ch,修改配置,然后从最新binlog同步。
from synch.
就是把进程杀了然后重新启动
from synch.
谢谢,我先去试试
from synch.
这个进程名字是啥啊,我找了所有进程找不到看起来像的。
from synch.
你用什么启动的?
from synch.
直接命令mysql2ch etl --schema
from synch.
这是全量同步,执行了就完了,没有后台进程
from synch.
那为啥改了配置文件不生效啊
from synch.
你需要什么生效?
from synch.
mysql_server_id = 1
init_binlog_file = mysql-bin.000002
init_binlog_pos = 271943925
from synch.
这是我之前按照模板来的
2020-06-11 16:06:06 - mysql2ch.producer:26 - INFO - start producer success!
2020-06-11 16:06:06 - mysql2ch.reader:76 - INFO - start sync at 2020-06-11 16:06:06
2020-06-11 16:06:06 - mysql2ch.reader:77 - INFO - mysql binlog: binlog.000088:2238
Traceback (most recent call last):
File "/usr/local/bin/mysql2ch", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/mysql2ch/cli.py", line 66, in cli
parse_args.run(parse_args)
File "/usr/local/lib/python3.6/site-packages/mysql2ch/cli.py", line 27, in run
args.func(args)
File "/usr/local/lib/python3.6/site-packages/mysql2ch/producer.py", line 43, in produce
skip_update_tables=settings.skip_update_tables,
File "/usr/local/lib/python3.6/site-packages/mysql2ch/reader.py", line 93, in binlog_reading
for binlog_event in stream:
File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/binlogstream.py", line 430, in fetchone
pkt = self._stream_connection._read_packet()
File "/usr/local/lib/python3.6/site-packages/pymysql/connections.py", line 684, in _read_packet
from synch.
配置文件我已经换了一个了,然后还换了个位置,依然没有作用
from synch.
这好像是权限的问题
from synch.
我一直是root运行的
from synch.
mysql账号
from synch.
我的全量导入已经成功了。
这个binlog运行的时候没有用我最新的配置, 我的是mysql-bin00002
from synch.
要先清空redis里面的
from synch.
我去试试
from synch.
删除缓存,更改配置文件成功,还是报之前那个错误!连接数据库问题吗?
from synch.
应该是你的mysql账号没有同步权限
from synch.
好的,我去瞅瞅,真的太感谢了。已star
from synch.
root没有同步权限吗?还有这操作
from synch.
你检查下mysql2ch.ini中mysql相关配置
from synch.
配置有问题,全量导入应该会失败吧
from synch.
报错就是报的读不到binlog
from synch.
好的。。
from synch.
请教一下,工程的本地调试在哪儿启动啊,刚刚下载了工程,搞了个pycharm,没用过。
from synch.
先用poetry安装依赖,执行python -m mysql2ch.cli consume --schema test
启动
from synch.
官方 docker-compose.yml 配置的 Redis 有问题,单独部署就解决了
version: '3'
services:
producer:
# depends_on:
# - redis
image: long2ice/synch
command: synch --alias mysql_db produce
volumes:
- ./synch.yaml:/synch/synch.yaml
# one service consume on schema
consumer.doraemon_user:
# depends_on:
# - redis
image: long2ice/synch
command: synch --alias mysql_db consume --schema doraemon_user
volumes:
- ./synch.yaml:/synch/synch.yaml
# redis:
# image: redis:latest
# volumes:
# - redis:/data
#volumes:
# redis:
from synch.
有报错吗
from synch.
事实上是Redis缓存的问题,若第一次运行报错,则Redis会缓存Mysql bin log 信息,而用 Docker 部署,若Redis数据卷未删除,只删除容器重新部署,那缓存是还在的,Redis重新部署时,缓存会从数据卷的磁盘读入。
from synch.
好的
from synch.
Related Issues (20)
- pymysql.util 依赖问题 HOT 4
- 支持windows调试吗 HOT 1
- pip install error HOT 2
- 支持表通配符配置 HOT 4
- 一些修复 希望检阅合并一下代码
- redis队列消费后,队列中的消息不删除 HOT 2
- 增量同步的时候支持mysql定期删数据吗? HOT 1
- 多表复制,配置文件应该怎么配置 HOT 3
- 可以不填写redis和kafka进行启动吗 HOT 1
- AttributeError: 'NoneType' object has no attribute 'get' HOT 1
- UnicodeDecodeError - 'utf-8' codec can't decode byte 0xff HOT 1
- AttributeError: 'NoneType' object has no attribute 'get' HOT 8
- BUG HOT 1
- postgres全量同步,数据过大导致错误
- 日志问题
- mysql到clickhouse HOT 2
- mysql同步到clickhouse全量初始化会超时 HOT 1
- 源数据时间有1970-01-01时间 增量同步失败
- 能否增加自定义目标数据库表名?
- 如何添加Oracle数据库? HOT 8
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 synch.