[MDEV-14754] mysql CLI with option --sql-log-bin=off Created: 2017-12-23  Updated: 2017-12-24  Resolved: 2017-12-24

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.2
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Oli Sennhauser Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

I would like to have mysql CLI with the option --sql-log-bin=off to avoid bin-log writing during restore to speed up restore and to safe space.
Should lead to a set session sql_log_bin=off;



 Comments   
Comment by Elena Stepanova [ 2017-12-23 ]

You can do it via --init-command='set sql_log_bin=0', does it really need a special option?

Comment by Oli Sennhauser [ 2017-12-24 ]

Oi, oi, oi... I did not even know that this option exists! (Or I am getting old and forgot about it? It is there since 5.5!) Thank you very much for educating me! I was only looking for a specific binlog related variable in the help output.
The command:
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;'
did perfectly what I wanted. Verified with the General Query Log.
Can be closed. Sorry for bothering you.

Generated at Thu Feb 08 08:16:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.