Problem with MySQL SSL connection (LibreOffice 6.3.x)

Hello,

I made on a Windows 10 computer a database connection with Base to the MySQL server at my provider. I try to do the exactly the same on a Linux Xubuntu 18.04 computer and I got this Error message:

Errorcode: 2026
SSL connection error: unknown error number

I chosen the following steps to make the connection (translated from the Dutch version, hopefully you understand the items):

  • Step 1: Select Database → Connect wit an existing database → MySQL
  • Step 2: Set MySQL-connection → Connect directly
  • Step 3: Settings of the server for MySQL → fill in of database name → fill in of servername and port
  • Step 4: User verification → fill in of user name, etc.

As mentioned I did in Windows 10 version exactly the same and it worked.

Who has any solution?

Thanks for reaction!

Hello,

Sorry but have no current method to test this.

It may be the connector and/or its use in Linux. This post may help but it is dealing with a JDBC connection → LibreOffice 6.x Base MySql connection using JDBC and SSL.

@Ratsinger: Thanks for your reaction, but how are the steps then?

If I fill under step 3:

Jdbc:mysql://127.0.0.1:3306/sample?verifyServerCertificate=false&useSSL=true&requireSSL=true

I got other errors.

@joppa,

If you are taking the direction to use JDBC, the connection type must be changed. You need to install a JDBC connector → MySQL Connector/J. Then add the .jar file to the Class Path:

The appropriate folder containing the Java archive can be set through `Tools >Options > Java > ClassPath`.

Then to change connection type in Base, from Menu - Edit->Database->Connection Type... The you choose Myslw(JDBC). On following pages enter required information for DB and when asked, the driver class is com.mysql.jdbc.Driver.

Note: When you get errors, it is important to present the actual error you have gotten. This helps point someone in a direction. I got other errors. does not help.

@Ratsinger:
First my apologises that I didn’t give the error codes last time.

Thanks for your advise. I think I’m a little further. Previous I didn’t know that I had to download anywhere the .jar file.

What have I done:

  1. Installed the .jar
  2. Add the .jar to the ClassPath
  3. In my “step 2” I choosed for “Connection with JDBC”
  4. In my “step 3” I filled in the Dabasename, Server, port and the MySQL JDBC driver “com.mysql.jdbc.Driver”.
  5. I tested the driver and I got “JDBC driver is loaded”. :slight_smile:
  6. In the next step I filled in my username and checked “Password needed”, I test the connection.

And got an error:

**SQL-status: 08S01
Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.**

Another error, but no connection :frowning: What can this say?

My provider wrote me that I have to choose for a TLSv1.2 connection with a by the MySQL server understood Cipher Protocol. I haven’t any idea what is says.

@joppa,

Sorry but I should have said something after your first comment. The connection string you posted:

Jdbc:mysql://127.0.0.1:3306/sample?verifyServerCertificate=false&useSSL=true&requireSSL=true

is just a copy from the other post.

127.0.0.1 is the host name, 3306 is the port the DB is listening on and sample is the name of the database being accessed. You need to change these items to where your server is, the port and the database you are connecting to. The server address may also be something like remotemysql.com and not necessarily an ip address. This is information only you have access to.

Hi, thanks for your fast reaction. But where have I to fill in the Jdbc:mysql: etc?

Sorry don’t have first hand knowledge of TLS except that SSL is its predecessor. No information on connecting using TLS.

Edit: This comment may negate your last request. Don’t think SSL will work based upon comment from provider about TLS needed.

From phpmyadmin I got this info

Servertype: MariaDB
Serverversie: 10.0.38-MariaDB-cll-lve - MariaDB Server
Protocolversie: 10

Is the driver that I chosen correct or does I have to use another driver?

Information is just about the server version and protocol.

Again it appears the original answer provided will not work in your case as it deals with SSL not TLS as your provider requires. Have no further information on TLS.

Question was answered based upon SSL.

@joppa,

If you are connecting to a MariaDB you may need to use a different JDBC connector from them. Possibly see → About MariaDB Connector/J.

Have no first hand knowledge of this or even a way to test. However, this may have TLS ability.

@Ratsinger: Yes, I just find out by myself and is works.

For complete info:
The MySQL JDBC Driver Class is named: org.mariadb.jdbc.Driver

Problem solved

PS How to close this item?

@joppla,

Don’t need to close anything. You can accept an answer by clicking checkmark (upper left of answer to credit). Slow response so only click once. It will turn green. You can upvote answers (liked answer) by clicking on the ^ or downvote (dislike answer by clicking the the down carret.

All is at your discretion.

Glad you got all working!

The problem is solved by:

  1. Downloading the connector from Download MariaDB Products & Tools | MariaDB
  2. Copy the mariadb-java-client-2.4.4.jar file to /usr/share/java (linux/ubuntu solution)
  3. Add the ClassPath in >extra>options>LibreOffice>Advanced
  4. Use org.mariadb.jdbc.Driver as MySQL driver in the jdbc connection

Succes!