Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不支持window, start_file找不到 #85

Open
hawkcraw opened this issue Feb 23, 2021 · 5 comments
Open

不支持window, start_file找不到 #85

hawkcraw opened this issue Feb 23, 2021 · 5 comments

Comments

@hawkcraw
Copy link

已经确认所有配置准确,linux可以运行,window总是提示以下错误
ValueError: parameter error: start_file 'binlog.000001' not in mysql server

@renyanwei
Copy link

你的命令里binlog.000001前后加单引号了吧,去掉试试看。。。

@michael-liumh
Copy link

你先去主库上show master logs看看你指定的文件有没有吧,没有报错很正常

@faisalalsalm
Copy link

faisalalsalm commented Jun 21, 2022

any fix on this i'm facing this issue on both windows and linux

@A-stranger
Copy link

`(base) PS D:\green-soft\binlog2sql-master\binlog2sql> python binlog2sql.py -h 127.0.0.1 -P 3306 -u root -p 123456 -d data_etl -t student_cdc --start-file=mysql-bin-file.000176 --start-datetime='2022-10-15 08:00:00' --stop-datetime='2022-10-15 11:00:00'

D:\ProgramData\Anaconda3\lib\site-packages\pymysql\cursors.py:166: Warning: (1366, "Incorrect string value: '\xD6\xD0\xB9\xFA\xB1\xEA...' for column 'VARIABLE_VALUE' at row 480")
result = self._query(query)

INSERT INTO data_etl.student_cdc(学号, 姓名, 性别, 班级, 年龄, 成绩, 身高, 手机, 插入时间, 更新时间) VALUES (5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); #start 105360 end 105693 time 2022-10-15 09:45:50
INSERT INTO data_etl.student_cdc(学号, 姓名, 性别, 班级, 年龄, 成绩, 身高, 手机, 插入时间, 更新时间) VALUES (6, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); #start 105776 end 106109 time 2022-10-15 09:45:55`

@xxmd
Copy link

xxmd commented Feb 18, 2023

你的命令里binlog.000001前后加单引号了吧,去掉试试看。。。
对的,在window cmd里面运行这个命令要去掉单引号,数据库密码的单引号也要去掉

  1. 错误的命令格式(带了单引号)
    python binlog2sql.py -h127.0.0.1 -P3306 -uadmin -p'admin' -dtest -t test3 test4 --start-file='mysql-bin.000002'
  2. 正确的命令格式(去除单引号)
    python binlog2sql.py -h127.0.0.1 -P3306 -uadmin -padmin -dtest -t test3 test4 --start-file=mysql-bin.000002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants