We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5c6a93 commit 4b00590Copy full SHA for 4b00590
modules/mysql/mysql.go
@@ -30,12 +30,12 @@ func WithDefaultCredentials() testcontainers.CustomizeRequestOption {
30
return func(req *testcontainers.GenericContainerRequest) error {
31
username := req.Env["MYSQL_USER"]
32
password := req.Env["MYSQL_PASSWORD"]
33
-
+
34
if strings.EqualFold(rootUser, username) {
35
// When using root user, remove MYSQL_USER and MYSQL_PASSWORD
36
delete(req.Env, "MYSQL_USER")
37
delete(req.Env, "MYSQL_PASSWORD")
38
39
// Set root password or allow empty password
40
if len(password) != 0 && password != "" {
41
req.Env["MYSQL_ROOT_PASSWORD"] = password
0 commit comments