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:
However if you want a permanent solution, edit your
my.cnf configuration file and add either:
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 ;)