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

NO_KEY_OPTIONS is remove from mysql8.0 #321

Open
wenweih opened this issue Sep 19, 2018 · 4 comments
Open

NO_KEY_OPTIONS is remove from mysql8.0 #321

wenweih opened this issue Sep 19, 2018 · 4 comments

Comments

@wenweih
Copy link

wenweih commented Sep 19, 2018

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)
@siddontang
Copy link
Collaborator

Thanks @wenweih

after #312 is merged, we will start to support 8.0. hope you can send us a PR to fix this problem.

@pidario
Copy link

pidario commented May 28, 2019

Sorry to comment on a closed issue.. I'm using last commit in master (so it should already contain #312) but I still get that error:
mysqldump: Couldn't execute 'SET SQL_QUOTE_SHOW_CREATE=1/*!40102 ,SQL_MODE=concat(@@sql_mode, _utf8 ',NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') */': Variable 'sql_mode' can't be set to the value of 'NO_KEY_OPTIONS' (1231)

Mysql version is 8.0.15, and my.cnf is like this:

[client]
default-character-set=utf8

[mysql]
default-character-set=utf8

[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8
#skip-log-bin
log_bin=/var/log/mysql/mysql-bin.log

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
default-authentication-plugin=mysql_native_password
key_buffer_size=16M
innodb_buffer_pool_size=300M
innodb_log_file_size=48M
local_infile=ON

I tried to either add NO_KEY_OPTIONS to sql_mode in my.cnf or comment it out. Any idea?
Thank you

@siddontang
Copy link
Collaborator

@pidario

maybe you use an old mysqldump to connect mysql 8.0?

go-mysql will not set SQL_QUOTE_SHOW_CREATE.

@pidario
Copy link

pidario commented Jun 3, 2019

@siddontang

I was actually using an old version, but after updating the same error showed up. It doesn't matter anymore since I decided to take another approach.

Thanks anyway.

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

3 participants