Issue 128035

Summary: Can't use AOO with MariaDB and JDBC
Product: Base Reporter: Mechtilde <mechtilde>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Blocker    
Priority: P2 CC: damjan, oooforum, petko
Version: 4.2.0-dev   
Target Milestone: 4.2.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: Medium

Description Mechtilde 2019-02-09 16:08:33 UTC
I use AOO as a client for several databases. Most of them were originally created with MySQL. Now I use Mariadb on my Debian machines.

There is no MySQL JDBC Driver available. I get the message: "Can't load com.mysql.jdbc.Driver"

For using Mariadb there is an own JDBC Driver. The name of the driver class is org.mariadb.jdbc.Driver.

I found hardcoded entries: 

main/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java	
  67             prop[0] = new PropertyValue("JavaDriverClass", 0, "com.mysql.jdbc.Driver", PropertyState.DIRECT_VALUE);

main/connectivity/source/drivers/mysql/YDriver.cxx	
 183                                                                         ,makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver")))

 234             ::rtl::OUString sDriverClass(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver"));
 354                                         ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver"))

main/connectivity/source/drivers/mysql/mysql.xcu	
  41             <value>com.mysql.jdbc.Driver</value>


I think it is necessary to be able to use both entries.
Comment 1 damjan 2019-02-09 16:36:12 UTC
You can probably use the generic "JDBC" driver type and enter that class name there, but let's leave this bug open for adding native MariaDB support too.
Comment 2 Mechtilde 2019-02-10 11:03:38 UTC
for documentation

under Linux the class path is: /usr/share/java/mariadb-java-client.jar

The data source URL is: jdbc:mysql://<server name>/<database name>

If you want to edit data you must add "?useHostsInPrivileges=false"
Comment 3 Peter 2019-07-28 03:13:55 UTC
Is this still open?
Comment 4 Koray Durgut 2019-08-09 11:17:06 UTC
AtOmXpLuS : Everything in AtOmXpLuS.CoM
Comment 5 oooforum (fr) 2020-04-04 16:19:52 UTC
I have no problem to connect a MariaDB
I use this extension to have a native MySQL driver:
https://extensions.openoffice.org/fr/project/mysql-driver-apache-openoffice

Maybe this could be integrated?
Comment 6 damjan 2023-09-29 18:30:00 UTC
(In reply to Mechtilde from comment #0)
> I think it is necessary to be able to use both entries.

But use both HOW?

Should we allow the use of either driver for either database?

Or should we add a "MariaDB" driver that is for MariaDB?