LibreOffice Base to Mariadb connection

I am connecting LibreOffice (Version 6) Base to a remote Mariadb (V10).

However it seems that I can only make the connection if the package libreoffice-base-drivers-mysql (6.0.5.2) is installed.
This means that I am unable to install the latest version of Libreoffice (6.1.3.2) without making the connection impossible.

Does anyone know how to connect LibreOffice 6.1.3.2 Base with a remote Mariadb (v10) without using the **libreoffice-base-drivers-mysql **package?

I don’t understand why you would want to connect Base to a mariadb without using the libreoffice-base-drivers-mysql package.

TSU

The only reason is that I am obliged to deinstall LO 6.1.3.2 in order to install the version of LO that is compatible with the available libreoffice-base-drivers-mysql package.

When I get software notifications that new packages (including LO) are available, I am obliged to remember **not to install **the LO package updates. Since I am not using LO Base/Mysql very often, I spent a couple of hours the other day trying to figure out why my database connection was broken before I could use it. The reason was that I had taken a string of LO updates over time not realising that there was an incompatibility between the available libreoffice-base-drivers-mysql and the current LO packages.

It’s not a monster issue, just a bit of a nuisance.

Not sure I understand the problem but you can lock any package you don’t want to have updated in Yast-Software management Just right click and select “Protect”

You are right. I could protect myself from LO updates, but LO-updates are always welcome:sarcastic::wink:

Looks like the driver-mysql package no longer gets built by default, it’s absent in Tumbleweed. You could ask the maintainer to enable the build for newer versions.

That sounds helpful. How do I make such a request?

If you can wait for the drivers package to be updated, I recommend you do so.

Else,
You can go “old school” before native drivers were available.

The old way…
The procedure
https://wiki.openoffice.org/wiki/Connect_MySQL_and_Base

Note that the JDBC connector is recommended, the ODBC connector is an alternative that might also work.

TSU

Submit to https://bugzilla.opensuse.org with a “Feature Request” priority.

Edit - Although requesting a package upgrade should normally be a Feature Request,
In this case, I might consider that the importance of this package might warrant at least a “normal” priority.

TSU

Bug 1119104 submitted. :slight_smile:

This might seem a good idea, but even though the connection pool and the relevant pooling for the drivers is enabled, on testing the class all I get is “The JDBC driver could not be loaded”. I have run out of ideas. Does anyone have any?
(The above wiki does not seem to be very helpful, as it is a) oriented toward OO not LO and b) suggests downloading archives that are presumably already in the OpenSUSE distro)

I wonder whether someone can help me here. In connecting using the JDBC connector the ‘JDBC driver could not be loaded’. I use the

com.sun.star.comp.sdbc.JDBCDriver

that is listed under the LO options for database connections. The pool is enabled.
What am I doing wrong?

As of now I can get none of the connection techniques to work! The bug I submitted is still ‘NEW’, i.e. no-one has been assigned to do anything about mysql connection drivers.

This is very frustrating. Can anyone suggest a remedy?

I suppose I could ditch LibreOffice/Mysql in favour another database system, but which one is recommended?

Having had some quite intensive, positive experience with Microsoft Access, I was hoping for something close to it (or even better!) from LibreOffice/Mysql, but at the moment this is hardly in sight.

Cheers
hn

Which version are you using?
Looks like a later version (6.07) was built and is available from the Libreoffice 6.0 repo

https://software.opensuse.org/package/libreoffice-base-drivers-mysql?search_term=libreoffice-base-drivers-mysql

TSU

Thu Jun 7 11:01:54 UTC 2018 - tchvatal@suse.com

  • Update to 6.1.0.0.beta1:
    • 6.1 series first beta, many fixes and features around
    • Notably kde5_gtk3 integration, on by default now
  • Remove merged patches:
    • 0001-Use-PYTHON_FOR_BUILD-instead-of-calling-python-direc.patch
    • libreoffice-icu61.patch
    • kde5-configure-checks.patch
    • bnc1060128.patch
    • bnc1039203.patch
    • bnc1094359.patch
  • Disable firebird everywhere for now as it causes issues
  • Try to implement safeguarding to avoid bsc#1050305
    **- Disable base-drivers-mysql as it needs mysqlcppcon that is only
    for mysql and not mariadb, causes issues bsc#1094779
    • Users can still connect using jdbc/odbc**
  • Fix java detection on machines with too many cpus
    • libreoffice-java-sched.patch
  • Remove galaxy icon theme replaced by colibri
  • Add karasa jaga icon theme

This is from changelog for LO 6.1:

I’m using LO 6.1.3.2. / Leap 15

The log statement

**- Disable base-drivers-mysql as it needs mysqlcppcon that is only
  for mysql and not mariadb, causes issues bsc#1094779
  * Users can still connect using jdbc/odbc**

is not very helpful, since the base-drivers-mysql are disabled and the jdbc/odbc drivers ‘cannot be loaded’ (see my previous posts). So there are no means to connect to the mysql database.

Is it such a good idea to load the base-drivers-mysql 6.0.7.3 (from SLE 15) with the current LO version?

You should still at least try the driver package I pointed you to…
It built successfully for LEAP 15/15.1 while everything else failed.

TSU

First, verify your OpenOffice is configured correctly, note at the bottom of the Wik the following

OpenOffice.org settings

  • OpenOffice.org uses Java for JDBC, please make sure you have JRE at Tools - Options - OpenOffice.org General - Java
  • Declare the mysql-connector-j.bin
    at the classpath at Tools - Options - OpenOFfice.org General - Java> - MySQL and JDBC on Debian Testing: Package sun-java6-jre from the non-free repository is needed and has to be activated in “Options-> OpenOffice.org -> Java”. The FSF java environment will not work returning a SQL syntax code whenever connecting to the MySQL server (July 27th 2008).

You can also try opening a runtime journal console while you attaempt to set up your JDBC connector, maybe a more descriptive error will display

journalctl -f

And, of course to run a JDBC connector, you have to have Java installed.
Run and if necessary post the following to verify something is installed

which java

Finally,
If you can’t get the JDBC to work, then try an ODBC connector.

TSU

I fear I am not clever enough to unravel this. :frowning:
The LibreOffce option menu is apparently not structured in the same way as OpenOffice. I suspect the LO Option is reached under Options > LibreOffice > Advanced (certainly NOT under General).
In my configuraton the JRE are installed (from Oracle Corporation version 1.8.0_191).

I can make neither head nor tail of the journal log messages when I try to connect using the JDBC drivers. The messages start with:

Mar 05 16:22:20 linux-lueh.fritz.box gnome-shell[7656]: Object Meta.WindowActor (0x55f2e557af90), has been already finalized. Impossible to get any property from it.
Mar 05 16:22:20 linux-lueh.fritz.box gnome-shell[7656]: Object Meta.WindowActor (0x55f2e557af90), has been already finalized. Impossible to set any property to it.


and the error message from LibreOffice Base is “The driver class ‘com.mysql.jdbc.Driver’ could not be loaded”
That is as far as it goes whatever I do.

Googling your journal errors, I don’t get any hits that could be related to JDBC functionality, my guess is that those errors actually relate to a problem displaying in a Gnome UI environment. You can try running an XTerm console instead of Gnome-shell, but don’t know if that would be any different.

The odd thing is that the reason why JDBC and ODBC should generally work as a backup solution for nearly all databases is that they are well known standards which have existed for decades, and there is little reason to remove support for these kinds of connections.

Official LibreOffice Doc for JDBC
https://help.libreoffice.org/Common/JDBC_Connection

Highly recommended LibreOffice help article

Try the above,
TSU