-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
MySQLContainer can't start the 8 MySQL version. #1168
Conversation
mysql 8 container needs "mysqld --default-authentication-plugin=mysql_native_password" command to start
This fix is supposed to address the problem of using a " When using the following JDBC URL, everything works fine: But if the user wants to use MySQL 8, you'd expect them to use the following JDBC URL: This is all documented pretty well in issue #736 . This PR attempts to fix the problem by modifying Another approach to solve issue #736, which I think would be better in the long run is to modify |
Sorry for not responding on this one yet, but I would like to spend a bit of time exploring whether there are other options. Relying on the image tag name to detect whether the v8-specific workaround needs to be applied seems a bit risky given that custom images can be used. One interesting area I'm currently looking into is that it appears |
Could be a useful change - at least it will stop "out of the box" issues with MySQL 8. Ideally, I would like to see Maybe the best solution is to fork the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this. |
@rnorth - any updates regarding this issue? |
Sorry @guss77 - I was contemplating your previous comment and then got sidetracked at some point. I apologise.
I think this sounds like the best solution to be honest. Naming is a silly but hard thing here, as I'd not really want to end up with I think I'd prefer to keep |
Maybe we should change |
Or we could run |
@guss77 the patch does not cover |
Huh, this is interesting! Did anyone consider (and rule out) approaching this from the driver angle? i.e. If you want to use a Testcontainers has the driver as a runtime dependency, not transitive, so it's completely up to the user to choose which driver they need. I've just tried this out, modifying our
Thus, I now have the following test code working without problems: for (String tag : asList("5.5", "5.6", "5.7", "8")) {
try (final MySQLContainer container = new MySQLContainer<>("mysql:" + tag)) {
container.start();
}
} Have I missed some huge problem with this approach 🤔 😂 ? |
But you also changed |
@rnorth nice! I would say 5.1+ is a reasonable baseline 👍 |
Fix suggestion for issue #736.