-
-
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
establishing connection with privileged user (mysql) #682
Comments
Hi @dfreudenberger, We are using the official MySQL image. If you want root access to the database, you can use (the hardcoded) username "root" with password "test". Would this work for your use case? And does your use case involve creating different schemas? |
Hi @kiview thank for getting back to me quickly. As of right now I'm relying on the jdbc url modification in order to start the docker container and it seems like there is no way to provide a username and password for the connection. Maybe this is something that could be build on top of this PR #617 Best, |
Hey @dfreudenberger, Else adding this feature after merging the mentioned PR would definitely make sense. |
Hey again, adding user or password to the query string doesn't have any effect. I'll wait until the PR is merged and will provide a pull request afterwards. Best |
@kiview Sorry to comment on an old thread but your comment seems related to what I am trying to achieve here https://stackoverflow.com/questions/65031662/mysql-testcontainers-init-script-schema-creation-failing is there anyway to create schemas in a mysql test containers instance or do I need to run a custom image with these pre-created? I tried connecting as root / test but this seems to hang the container startup. |
Hi there,
is there any special reason why the connection is established with a user that has access to the test schema only? I'm working on an application that needs access to tables in different schemas and is using flyway to manage the migrations. Unfortunately flyway already fails because it is unable to create the schemas.
Happy to work on a pull request if this is open for change.
Best,
Daniel
The text was updated successfully, but these errors were encountered: