Flyway: Flyway doesn't support Mariadb 10.3 by using latest jdbc-driver

Created on 28 Mar 2019  路  4Comments  路  Source: flyway/flyway

Latest Flyway Core (version 5.2.4) doesn't support MariaDB version 10.3 when you are using MariaDB Java Client version 2.4.0 or 2.4.1.

Snippet from Gradle:

compile group: 'org.flywaydb', name: 'flyway-core', version: '5.2.4'
compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.4.1'

Using versions mentioned up causes following exception:

org.flywaydb.core.api.FlywayException: Unsupported Database: MariaDB 10.3
at org.flywaydb.core.internal.jdbc.DatabaseType.fromDatabaseProductNameAndPostgreSQLVersion(DatabaseType.java:168)
at org.flywaydb.core.internal.jdbc.DatabaseType.fromJdbcConnection(DatabaseType.java:117)
at org.flywaydb.core.internal.database.DatabaseFactory.createDatabase(DatabaseFactory.java:90)
at org.flywaydb.core.Flyway.execute(Flyway.java:1670)
at org.flywaydb.core.Flyway.clean(Flyway.java:1499)

Best,
Eero.

MariaDB duplicate

Most helpful comment

Latest versions of MariaDB Connector/J driver return "MariaDB" server type instead of "MySQL", that's why Flyway worked with previous versions of this driver (Spring Framework and many projects had the same issue).

To make it work with 2.4.x: simply add useMysqlMetadata=true to your jdbc url -> driver will return "MySQL" server type.

Source: https://mariadb.com/kb/en/library/about-mariadb-connector-j/#essential-parameters -> useMysqlMetadata

All 4 comments

Latest versions of MariaDB Connector/J driver return "MariaDB" server type instead of "MySQL", that's why Flyway worked with previous versions of this driver (Spring Framework and many projects had the same issue).

To make it work with 2.4.x: simply add useMysqlMetadata=true to your jdbc url -> driver will return "MySQL" server type.

Source: https://mariadb.com/kb/en/library/about-mariadb-connector-j/#essential-parameters -> useMysqlMetadata

Duplicate of #2289

I have the same issue, and even with useMysqlMetadata=true prop, still does not work, any new suggestions are welcome, thx.

@vasilemihali 6.0.0-beta contains a fix for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

berlin-ab picture berlin-ab  路  3Comments

neblina-software picture neblina-software  路  4Comments

tarciosaraiva picture tarciosaraiva  路  3Comments

expeditioneer picture expeditioneer  路  4Comments

axelfontaine picture axelfontaine  路  4Comments