Ask Your Question
0

Problem with MySQL SSL connection (LibreOffice 6.3.x)

asked 2019-10-03 20:59:56 +0200

joppla gravatar image

updated 2019-10-04 10:19:10 +0200

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!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2019-10-05 23:16:43 +0200

joppla gravatar image

The problem is solved by:

  1. Downloading the connector from https://mariadb.com/downloads/#connectors
  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!

edit flag offensive delete link more
1

answered 2019-10-03 22:48:38 +0200

Ratslinger gravatar image

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.

edit flag offensive delete link more

Comments

@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.

joppla gravatar imagejoppla ( 2019-10-04 10:16:41 +0200 )edit

@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.

Ratslinger gravatar imageRatslinger ( 2019-10-04 17:29:17 +0200 )edit

@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". :-)
  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 :-( What can this say?

joppla gravatar imagejoppla ( 2019-10-05 21:54:20 +0200 )edit

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.

joppla gravatar imagejoppla ( 2019-10-05 22:08:48 +0200 )edit

@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.

Ratslinger gravatar imageRatslinger ( 2019-10-05 22:11:46 +0200 )edit

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

joppla gravatar imagejoppla ( 2019-10-05 22:20:28 +0200 )edit

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.

Ratslinger gravatar imageRatslinger ( 2019-10-05 22:24:49 +0200 )edit

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?

joppla gravatar imagejoppla ( 2019-10-05 22:30:35 +0200 )edit

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.

Ratslinger gravatar imageRatslinger ( 2019-10-05 22:38:40 +0200 )edit

@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.

Ratslinger gravatar imageRatslinger ( 2019-10-05 23:04:57 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-10-03 20:59:56 +0200

Seen: 316 times

Last updated: Oct 05 '19