go-mysql-org / go-mysql-elasticsearch

Sync MySQL data into elasticsearch
MIT License
4.1k stars 798 forks source link

mysqldump error: NO_KEY_OPTIONS #326

Open nik098 opened 5 years ago

nik098 commented 5 years ago

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

Receive error:

mysqldump: Couldn't execute 'SET SQL_QUOTE_SHOW_CREATE=1 ,SQL_MODE=concat(@@sql_mode, _utf8mb4 ',NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') ': Variable 'sql_mode' can't be set to the value of 'NO_KEY_OPTIONS' (1231)

Using MySql 8.0.13 and as far as I know NO_KEY_OPTIONS is not supported anymore in v8.x so need to prevent this sql mode from being used.

If I add "compatible=NO_KEY_OPTIONS" to [mysqldump] in my.cnf then receive below error:

Invalid mode to --compatible: NO_KEY_OPTIONS [2019/03/15 17:51:19] [error] canal.go:213 canal dump mysql err: exit status 1 [2019/03/15 17:51:19] [error] river.go:299 start canal err exit status 1

tiankonghewo commented 5 years ago

你的river.toml写的应该是有问题

scholar-ink commented 5 years ago

@xman009 请问有解决,遇到同样的问题

wenj91 commented 4 years ago

升级mysqldump的版本,升级到8.0.14后版本 mysqldump --skip-create-options fails on MySQL 8.0 server