Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MariaDB config has binlogging enabled by default #520

Closed
duncanjbrown opened this issue Mar 19, 2016 · 2 comments
Closed

MariaDB config has binlogging enabled by default #520

duncanjbrown opened this issue Mar 19, 2016 · 2 comments

Comments

@duncanjbrown
Copy link
Contributor

I have a 100MB database, and my production server fell over in the middle of the night after /var/log/mysql filled up with mariadb-bin files. I don't need binary logs because I'm not doing replication, and I expect that's true of a majority of users.

Per this StackOverflow answer, it is possible to define a custom override in /etc/mysql/conf.d which could either disable binlogging, or set the log retention period to something less that the 10 days it currently stands at.

Ansible novice here, but happy to attempt a PR if this would be useful.

@swalkinshaw
Copy link
Member

After looking into it, I'd be okay with disabling it by default. Anyone setting up MySQL replication will need to do a lot more manual work anyway so they could just re-enable it.

If you want to attempt the PR, this would be a good introduction to Ansible. It would look something like:

  1. Add a task in roles/mariadb/tasks/main.yml and use the template action to create a conf file in /etc/mysql/conf.d.
  2. Create the template in roles/mariadb/templates that the above action uses.
  3. Create a default variable in roles/mariadb/defaults/main.yml which would act as a toggle.
  4. Maybe just skip the task in 1 entirely using a when condition with the variable from 3.

@duncanjbrown
Copy link
Contributor Author

@swalkinshaw, thanks for your response. I will have a go at the approach you suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants