Bug #89046 mysql client with sql-log-bin=off option
Submitted: 23 Dec 2017 19:12 Modified: 24 Dec 2017 9:18
Reporter: Oli Sennhauser Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: MySQL, sql_log_bin

[23 Dec 2017 19:12] Oli Sennhauser
Description:
I would like to have mysql client with the sql-log-bin=off option. To speed up imports/restores and to reduce disk space usage.

How to repeat:
zcat full_dump.sql.gz | mysql --sql-log-bin=off --user=root 

Suggested fix:
sql-log-bin=off should lead to set session sql_log_bin=off.
Workaround echo "set session sql_log_bin=off"; zcat full_dump.sql.gz | mysql
[24 Dec 2017 9:17] Oli Sennhauser
I learned today morning that there is an option --init-command which does exactly what I need:
cat full_dump.sql  | mysql -u root --init-command='set session sql_log_bin=0; set global innodb_flush_log_at_trx_commit=0; set global super_read_only = off;'
So this request can be closed.
[24 Dec 2017 9:18] Oli Sennhauser
can be worked around with --init-command