There is some conflicting info floating around. Apparently, MySQL 8.0+ enables binary logs by default so a lot of server admins are discovering this in the middle of the night due to crashed servers!
Generally speaking MySQL uses dashes -
for inline command flags, and uses underscores _
for permanent config option names... this is common for many apps, actually. However, for whatever reason this is becoming less true, and various formats are now acceptable (more below)...
If you want to disable binary logs for your current session only, then use either:
--disable-log-bin
--skip-log-bin
However if you want a permanent solution, edit your my.cnf
configuration file and add either:
disable-log-bin
skip-log-bin
disable_log_bin
skip_log_bin
I have tested all of these variations successfully in our SlickStack boilerplate. (Whichever one you choose is fine, just be sure not to include multiple versions.)
Note that the syntax shared by OP does NOT work: log_bin = OFF
You may be wondering why MySQL has made things so complicated, but answering that is above my pay grade and I'd venture to guess, they just want to confuse us as much as possible ;)
[mysqld]
section?log_bin=filename
. So I changed it to (one of) the above and restarted the database. Then tried the next one etc.log_bin_basename
is where the name goes (since early in 5.6). Andlog_bin
has always been ON/OFF.