Sidebar

How to configure the JDBC connection to the QIE database for MariaDB?

0 votes
324 views
asked May 17, 2020 by rich-c-2789 (15,580 points)
edited Aug 27, 2020 by ben-s-7515
I am trying to configure QIE to use a MariaDB database. What is the correct way to configure the connection? Specifically what values should I use for:

-Dconnection.driver=
-Dconnection.url=
-Dhibernate.dialect=

1 Answer

0 votes

That depends on several variables.

    1. The version of QIE
    2. The version of the MariaDB database
    3. The version of the JDBC Driver for MariaDB (Connector/J)
    4. How the MariaDB server is configured.  (secure connections, authentication plugin, unicode support, timezone, etc.  See resources below for more or the database documentation for more info.)
    etc.

For QIE version .49, with MariaDB 10.5.x and MariaDB 10.3.x, and MariaDB Connector/J 2.6.0:

    -Dconnection.driver=org.mariadb.jdbc.Driver
    -Dconnection.url=jdbc:mariadb://[your mariadb instance name]:[port to your mariadb instance]/[your database name]
    -Dhibernate.dialect=com.qvera.qie.persistence.MariaDB103UnicodeDialect

For QIE version .48, with MariaDB 10.5.x and MariaDB 10.3.x, and MariaDB Connector/J 2.6.0:

    -Dconnection.driver=org.mariadb.jdbc.Driver
    -Dconnection.url=jdbc:mariadb://[your mariadb instance name]:[port to your mariadb instance]/[your database name]
    -Dhibernate.dialect=com.qvera.qie.persistence.MySQLUnicodeDialect

Note:  In the MariaDB examples above, one used the com.qvera.qie.persistence.MySQLUnicodeDialect for the hibernate dialect when running QIE version.48, and the QIE version .49 used com.qvera.qie.persistence.MariaDB103UnicodeDialect. This is because in the QIE version .48 and lower, the only dialect available was the MySQLUnicodeDialect, but the new dialects were added with QIE version .49.

See also:
    What dialects are available in QIE?

Resources:
    https://mariadb.com/kb/en/about-mariadb-connector-j/

answered May 17, 2020 by rich-c-2789 (15,580 points)
edited Aug 27, 2020 by ben-s-7515
...