Closed cobed95 closed 2 years ago
Yea I ran into this the other day implementing https://github.com/schireson/pytest-mock-resources/pull/129/files#diff-4c6c8cd8e1ba97c69fc5b49df46ad19168ea302a8d3e9e2f95ea53ea8109b56aL99, which is otherwise unrelated. Since we default to such an old mysql container, i wonder if it's not even version specific, but rather a change in their docker images.
Perhaps we should be accepting the user/password we do today and using those to create a new user which is doled out to the fixture rather than the root user. I'll have to have a think about that, a much quicker fix ought to be what you suggest here ^, which is basically what i do in my PR
Hopefully fixed in 2.1.8
Thanks for the quick feedback. Is there any estimated release date for v2.1.8?
It's been released since my comment, though i see i forgot to actually do the github release
I see, thanks again!
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
It seems that MySQL 8 (specifically 8.0.23) requires setting only MYSQL_ROOT_PASSWORD when using 'root' user.
However, private fixture
_mysql_container
is giving MYSQL_USER and MYSQL_ROOT_PASSWORD together, and because 'root' is the default value ofMysqlConfig
'susername
field, default config can never run correctly.One might consider overriding the
username
field, but that requires setting MYSQL_PASSWORD environment variable to correctly create the custom user.I have tried overriding the
_mysql_container
fixture to provide additional environment variable with name MYSQL_PASSWORD, but the created user seems to be missing some privileges internally required by pytest-mock-resources.Describe the solution you'd like A clear and concise description of what you want to happen.
A proper support for different versions of MySQL, or additional fields in
MysqlConfig
to allow for a more graceful overriding.Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
I'm currently manually overriding the private
_mysql_container_fixture
as a temporary workaround.Additional context Add any other context or screenshots about the feature request here.