1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
818 views
by rich-c-2789 (17.6k points)
edited 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/

by rich-c-2789 (17.6k points)
edited by ben-s-7515
...