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

Getting unsupported error with correct versions? #2481

Closed
Tauri28 opened this issue Aug 25, 2019 · 9 comments
Closed

Getting unsupported error with correct versions? #2481

Tauri28 opened this issue Aug 25, 2019 · 9 comments

Comments

@Tauri28
Copy link

Tauri28 commented Aug 25, 2019

Which version and edition of Flyway are you using?

6.0.0 Community Edition

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

CLI

Which database are you using (type & version)?

MariaDB (ver. 10.2.20)

Which operating system are you using?

Windows 10 Pro 1809

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
flyway migrate -url=jdbc:mysql://127.0.0.1/hmvc_listing?serverTimezone=UTC -user=xxx -password=xxx -table=xxx -locations=xxx -sqlMigrationSeparator=- -baselineOnMigrate=true -baselineVersion=000 -sqlMigrationPrefix='.

What did you expect to see?

Successful migration.

What did you see instead?

ERROR: Flyway Enterprise Edition or MariaDB upgrade required: MariaDB 5.5 is no longer supported by Flyway Community Edition, but still supported by Flyway Enterprise Edition.

@goekay
Copy link

goekay commented Aug 26, 2019

we experience the same issue with builds using travis ci.

@pzygielo
Copy link

@Tauri28:

flyway migrate -url=jdbc:mysql://127.0.0.1/hmvc_listing?serverTimezone=UTC -user=xxx -password=xxx -table=xxx -locations=xxx -sqlMigrationSeparator=- -baselineOnMigrate=true -baselineVersion=000 -sqlMigrationPrefix='.

On https://flywaydb.org/documentation/database/mariadb the format of url is jdbc:mariadb:..., but you are using jdbc:mysql:.... Do you get the same error with url corrected?

@MikielAgutu
Copy link

I've managed to reproduce this. As @pzygielo suggested the problem is that you're using a MySQL JDBC url instead of a MariaDB one. If you use jdbc:mariadb://127.0.0.1/hmvc_listing... it should be fine.

I can't see a reason why we'd need to support such interchangeability. Is there an advantage to using the MySQL JDBC url?

@goekay
Copy link

goekay commented Aug 27, 2019

in our case, our product leaves the choice of database (mysql or mariadb) to the user/client. and since mariadb is supposed to be a drop-in replacement with some limitations and since mariadb connector/j itself allows both usages jdbc:(mysql|mariadb) i see this as a minor problem.

moreover, this was working with flyway 5.2.4 but stopped with 6.0.0 even though mariadb version we use (10.2.26) did not change. mariadb 10.2.26 is for sure newer than mariadb 5.5. therefore the report is not true.

@MikielAgutu
Copy link

Fair point! This is due to slightly odd behavior in the way JDBC reports Maria DB versions. We've introduced a fix that should be in the next release.

@goekay
Copy link

goekay commented Aug 28, 2019

thanks! as i understand from the commit, the version identification is corrected, which means we can continue using the prefix jdbc:mysql:... with mariadb, right?

@MikielAgutu
Copy link

Yes you can continue using that url.

@juliahayward juliahayward added this to the Flyway 6.0.1 milestone Aug 28, 2019
goekay added a commit to goekay/flywaydb.org that referenced this issue Aug 28, 2019
as established in flyway/flyway#2481, flyway supports both "jdbc:mysql" and "jdbc:mariadb" prefixes in database URLs.
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
@JavaNeed
Copy link

JavaNeed commented May 2, 2020

@ADAMBRITTRG
Copy link

This restriction is no longer in place from Flyway version 10 (October 2023). We have updated Flyway so that it works with ALL supported database versions, so if you upgrade to version 10 you can access all supported versions of MariaDB.

The community version of Flyway now works with All versions of MariaDB.

You can access the latest download from https://www.red-gate.com/products/flyway/community/download/

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

No branches or pull requests

8 participants