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.
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.
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=trueto your jdbc url -> driver will return "MySQL" server type.Source: https://mariadb.com/kb/en/library/about-mariadb-connector-j/#essential-parameters ->
useMysqlMetadata