How to connect Libreoffice Base with mysql on Ubuntu 20.04?

I have a virgin install of 20.04 (instead of upgrading from 18.04, and older versions). mysql works, but I cannot use LibreOffice Base to connect to my database in mysql. This worked well in 18.04. I searched the web, tried various apt installs, but still cannot connect. Typical errors are "...org.mariadb.jdbc:Driver..." or "...oracle.jdbc.driver.OracleDriver..." could not...

Update: I have downloaded mariadb-java-client-2.6.0.jar from It is a deb package, so I installed it with sudo apt install ./mariadb-java-client-2.6.0.jar. At this point things were strange. First, I had to rename the installed file in /usr/share/java by stripping the "-2.6.0" from the .jar file. Then connection either succeeded or not. When it did not succeed it complained about encryption, public key, etc. However, after signing on to the same database from mysql workbench then connection from LO Base worked.

Technically the problem is solved, but I cannot post this as "Answer" because of the idiosyncrasy of on or off connection. I'm sure there is a more elegant and straightforward solution out of the box when 20.04 is installed with LibreOffice Base.

1

1 Answer

I found this and it helped me dig a little deeper to find the answer. What you need to do is:

  1. Install the MySQL or MariaDB jar file, for ubuntu do:

    sudo apt install libmariadb-java

  2. Open Tools >Options >LibreOffice >Advanced

  3. Click the Class Path Button

  4. Click Add Archive

  5. Find your jar file, mine was in /usr/share/javaThen when you come to the screen in Base that has the test class button, it should validate for you.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like