Connect to MariaDB

Hi.
Trying to connect to an existing DB.
But after Connect to existing > MySQL/MariaDB
error
 
Downloaded the JDBC Driver but, for the life of me, can’t find out where is the .jar to add to Base!


 
REM: have a DB connected in another machine (not networked) and didn’t have problems with setting it up then. But don’t remeber how I did it.
( :question:)
Thanks in advance.

Tools>Options>Advanced> [Class Path…]

ClassPatch
 
Error2

Point to the .jar file like you did with the sqlite-*.jar

Screenshot from 2025-11-15 09-25-14
 
Error2
 
This was my first try. As it failed, then tried to unpack the folder…

Restart the office suite.
Be sure that your office suite is not running in some container.
Does the sqlite driver work for you?

  1. Of course.
  2. No.
  3. Yes.

My version is 2.5.3. Compatibility problem with the very latest versions?

:thinking:
Here
LO 24.2.7.2 (X86_64)
OS = Ubuntu 24.04.4
 
Connecting in the other machine (OS = Mint 21-3) I remeber it was straightforward, no stress.
And it works fine since then.
But don’t have it here now.

I mean the driver version mariadb-java-client-2.5.3.jar

Why do you use JDBC? There is a direct driver available for MariaDB in LibreOffice.

JDBC with MariaDB:
Latest Driver JDBC MariaDB
→ took mariadb-java-client-2.3.0.jar (tested also mariadb-java-client-3.5.6,jar)
→ added this jar-file to classpath in Tools → Options → LibreOffice →…
→ set Driver to org.mariadb.jdbc.Driver
Connection works well
→ removed mariadb-java-client-2.3.0.jar and added mariadb-java-client-3.5.6.jar - couldn’t connect, because there is missing a parameter for the databasew connection:
?permitMysqlScheme Added this parameter, which has to be set since mariadb-java-client-3…jar, to the database name and the connection worked.

= first thing I tried to do:
Connect to an existing database >
MySQL/MariaDB >
Connect using JDBC (Java Database Connectivity) >
Test Class = ERROR […]
Just followed the “menus” sequence proposed.

Screenshot from 2025-11-15 14-06-00

Have written a bug for this. Description doesn’t notice the direct connection, which has been introduce in LO 6.2. Default should be direct connection, not JDBC: 169466 – Database Wizard: MariaDB Step 2 - wrong default Entry and wrong Description

Also: where is this?
I needed to go to MariaDB Downloads and there get the
mariadb-java-client-3.5.6.jar

If you want to use JDBC (when downloaded the *.jar):
Tools → Options → LibreOffice → Advanced → Java Options → Class Path
add the *.jar archive file.
Then connect to the MariaDB as you tried before. Remember with version 3.5.6.jar you will need a parameter for the database: databasename?permitMysqlScheme.
JDBC driver class will be: org.mariadb.jdbc.Driver
.
If you want to use the direct connection:


This screenshot might help.
Choose the third entry “Connect directly (using MariaDB C Connector)”
Might be the direct connection isn’t available for some installations, because the driver hasn’t be installed. So you have to look for mariadb-driver for LibreOffice in software installer.

Didn’t “want”; it was the option I could find, as setting up an ODBC is a nightmare (did it for SQLite).

Of course. Let’s do it.
 
CREATE DATABASE testes;
Query OK, […]
 

  1. Sorry: a phone photo because was unable capture the screen in this first step, and also had to crop it to be able to upload:
    Screenshot from 2025-11-16 08-09-47


3.

:grey_question:

It’s the old Ubuntu-problem: Ubuntu doesn’t install the whole LibreOffice. Special for databases you have to install different packages to get, what you need.

Have a look for libreoffice-mysql-connector. Have never used Ubuntu. Have installed OpenSUSE since a long time.