On Sun, Jan 15, 2023, 1:04 PM Jason Haar <[email protected]> wrote:

> ...
> Error querying database.  Cause: java.sql.SQLException: No suitable driver
> found for jdbc:mysql://127.0.0.1:3306/guacamole
> ...
> After messing around for some time I thought to try
> replacing mariadb-java-client.jar file with the RockyLinux8 version and
> that fixed the problem. Rocky8 has mariadb-java-client-2.7.1-2.el8 and
> Rocky9 has mariadb-java-client-3.0.3-1.el9
>

This is because MariaDB Connector/J 3.x has dropped support for the
"jdbc:mysql:" URI format, now requiring that code using the driver either
use "jdbc:mariadb:" or explicitly specify a "permitMysqlScheme" attribute:

https://mariadb.com/kb/en/about-mariadb-connector-j/#jdbcmysql-scheme-compatibility

The "JDBCHelper" class from MyBatis Guice that we've been using uses
"jdbc:mysql:" for both the MySQL and MariaDB versions of the driver, hence
the failure. Code changes on either our side or within MyBatis would be
needed to be compatible with 3.x.

The 2.x version of the driver should work perfectly.

- Mike

Reply via email to