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

Fix MySQL ONLY_FULL_GROUP_BY #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pemontto
Copy link

Fixes #79

This will remove ONLY_FULL_GROUP_BY from the @@sql_modes only if MYSQL_ROOT_PASSWORD is defined as an env var for the misp container.

Changing this global setting requires a root account, so I've added MYSQL_ROOT_PASSWORD as an optional var on the misp container. Maybe it should be default for this compose file?

The alternative is to define add

--sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"

to the db container command. This may be simpler and not require exposing the root DB password to misp, but we'll need to track any changes or updates to the defaults, and it doesn't help if using an external DB (perhaps that can just be covered in documentation?).

Ideally this is all fixed upstream so we don't have to mess with the DB defaults.

@coolacid
Copy link
Owner

What happens if you use an older/newer MySQL instance? I'm wondering if there's a way we can do it in the DB container instead of the MISP container.

Looks like it might be simpler then we expect: docker-library/mysql#149

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

Successfully merging this pull request may close these issues.

500 error listing attributes and tags
2 participants