Skip to content
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

Latest image can't connect to jdbc #135

Closed
paulSambolin opened this issue Jan 30, 2024 · 4 comments
Closed

Latest image can't connect to jdbc #135

paulSambolin opened this issue Jan 30, 2024 · 4 comments

Comments

@paulSambolin
Copy link

Hey we started seeing connection issues around 12PM EST. Pinning to older version resolved connection issues

# flyway/flyway:latest-alpine
ERROR: Unable to connect to jdbc:mysql://<db host>:3306/<dbname>?enabledTLSProtocols=TLSv1.2&createDatabaseIfNotExist=true

# flyway/flyway:10.6-alpine
Success!
@tjs145
Copy link
Contributor

tjs145 commented Jan 31, 2024

This is a compatibility issue in the latest version of the MariaDB driver, which the Flyway CLI uses for both MariaDB and MySQL connections (the issue being that it no longer supports MySQL URLs by default). While we investigate a proper solution, here are some possible workarounds:

  • Add &permitMysqlScheme=true onto the end of your URL.
  • Download the MySQL driver and add it to the drivers folder in the docker container. (I'm not sure if there's an easy way of doing this in Docker. Perhaps by mapping a volume containing the MySQL driver onto the drivers folder.)

@paulSambolin
Copy link
Author

Confirmed &permitMysqlScheme=true works with the latest version. Thank you @tjs145 I will close the issue. Please re-open if needed

@mrairzuk
Copy link

mrairzuk commented Feb 5, 2024

Got same error with PostgreSQL DB. Was working fine with previous version.

Flyway OSS Edition 10.7.1 by Redgate
See release notes here: https://rd.gt/416ObMi
ERROR: Unable to connect to the database. Configure the url, user and password!

@mrairzuk
Copy link

mrairzuk commented Feb 5, 2024

Got same error with PostgreSQL DB. Was working fine with previous version.

Flyway OSS Edition 10.7.1 by Redgate See release notes here: https://rd.gt/416ObMi ERROR: Unable to connect to the database. Configure the url, user and password!

Downgrading to 10.6 resolves this error. I am using Docker image and configure connection using environment variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants