-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
MySQL: Fix problem of starting up mysql 5.7.33 version when user is root #3953
MySQL: Fix problem of starting up mysql 5.7.33 version when user is root #3953
Conversation
Fixes following problem in console of mysql container [ERROR] [Entrypoint]: MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user Remove MYSQL_USER="root" and use one of the following to control the root user password: - MYSQL_ROOT_PASSWORD - MYSQL_ALLOW_EMPTY_PASSWORD - MYSQL_RANDOM_ROOT_PASSWORD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @seveneves
Please could you add some tests which demonstrate the problem and can guard against regressions?
#2689 is a draft PR I created to demonstrate #2627 - this might be something you could use as a basis.
@rnorth |
I've noticed a bad (existing) bug when testing this locally... Firstly, I noticed that your It seems that setting the password to The terrible thing about the second piece of code is that the connection check fails continuously until timeout is reached, but upon hitting timeout it just continues. We're going to need to fix that; I think we'll also need to prevent |
1 similar comment
I've noticed a bad (existing) bug when testing this locally... Firstly, I noticed that your It seems that setting the password to The terrible thing about the second piece of code is that the connection check fails continuously until timeout is reached, but upon hitting timeout it just continues. We're going to need to fix that; I think we'll also need to prevent |
@rnorth I noticed the slow test run but I didn't dig into the reason. Thanks for finding the reason. I pushed a "fix" and replaced the What do you think? |
modules/mysql/src/test/java/org/testcontainers/containers/MySQLRootAccountTest.java
Show resolved
Hide resolved
@seveneves yes sure, I was going to suggest that. I'll follow up with a change to get null-checks where they need to be. If you could please add my suggested change, I think we're good. |
Co-authored-by: Richard North <rich.north@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, thanks for this @seveneves!
Fixes #3893, #2627
Fixes following problem in console of mysql container
Fixes issue #3893