Binary Logging is creating huge amounts of data at one point it was up to 50GB! I have tried to add a disable-log-bin to my.cnf but it gets overwritten on startup. How do I stop this???
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
System Details
Local Version:
Version 9.1.1+6738
Operating System (OS) and OS version:
Mac OS 15.1.1 (24B91)
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
I do have a number of sites in Local and one in particular had a number of bin logs. I purged them with PURGE BINARY LOGS BEFORE NOW(); but I would like to just turn it off so I don’t have to worry about this in dev. But where do y’all store the my.cnf.hbs file? it doesn’t seem to be in Application Support/Local?
After editing that file, you’ll need to restart the site in Local so that it can re-compile the config and restart the process.
Can you give that a try and let us know how it goes?
Instead of turning off the binary logging entirely in MySQL 8 with disable-log-bin you can also set the max_binlog_size and binlog_expire_logs_seconds variables to some minimal values to reduce the binary log size significantly but still keep some data integrity and recovery operations.
Thanks for this info and the links to the docs @emmtre !
Honestly, I’ve never dug too deeply into MySQL’s binary log options.
Am I right in thinking that bin logs are mostly used in production environments as a way to replicate changes from primary to secondary dbs as well as a sort of backup and audit feature if things go wrong?
If so, would it make sense to disable binary logs in Local since it’s a dev environment? Or is there some additional features of MySQL bin logs that are useful when developing?
That’s my understanding as well but I’m not an expert in this area. I’ve been told it’s better to set some smaller values for the other variables instead of turning off the logging completely but I don’t know for sure. Since the size of the binary logs might be a big problem I think this should be changed in the default my.cnf.hbs config file for MySQL 8 in a future update. But I think you need to consult a MySQL 8 expert or someone with more knowledge about this since it is such a critical decision. I have been running with the variables and values I posted above and so far it has been fine without any issues that I have noticed but it needs to be validated.