Mysql direct connector in LO 7

I have KDE Neon (updated with Kubuntu 20.04.01), which provides LO only 6.4, so I installed (in /opt) LO 7, not replacing, but adding to 6.4.
I’d like to have a direct mysql connection, but I noticed that mysql-connector provided with Ubuntu is not working with LO 7 in /opt.
And with the extension downloaded as extension there are problems.
How should I do to get mysql direct connect in LO 7 in /opt?
Thanks!

EDIT

Eventually I installed LO 7 via PPA, after removing LO in /opt. But I have still a connection problem, in odb files mysql-related, so to say: I get this error:

Can't connect to MySQL server on 'localhost' (111) /build/libreoffice-ron9it/libreoffice-7.0.0~rc3/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119  

EDIT

I noticed that this problem is not only in LO 7, but also in LO 6.4.
The last time that mysql-connector provided with Ubuntu worked correctly, was with the 6.0 version, before updating to Ubuntu 20.04.

Hello,

You do not state what version of MySQL server you are dealing with. I have not tried with LO v7.0.x yet but MySQL v5.7.x seems to present no problem with other versions I have tied.

MySQL v8.x seems to be problematic with the native connector. See tdf#135202

Don’t know of any fix currently except to change to either an ODBC or JDBC connector.

Just re-tested. JDBC works on Ubuntu 20.04 with MySQL v8.x but other connections fail. Failed connections will most likely need for bug to be fixed.

I never used JDBC: I hope that direct connection come back to life.

If interested, JDBC connection information is in the LO documentation → LibreOffice Base Guide in Cahpter 2.

Different MySQL connectors are found here → MySQL Connectors

The only connector working for me with newer LO versions and MySQL v8.x and “Strong Password Encryption” is JDBC. Native and MySQL(JDBC) do not work and there is no fix at this time.

It may be possible to change the MySQL authentication method but have no answer for that and is actually a question for one of their forums → MySQL Forums

Thank you. Today

  • I downloaded the instructions to connect via jdbc (from the link you provided),
  • downloaded the latest jdbc-mysql connector from here: Download mysql-connector-java JAR file with all dependencies,
  • symlinked the two files in /usr/lib/jvm/ and in /usr/lib/jvm/java-11-openjdk-amd64/ (that is the folder where LO search for java),
  • I restarted lampp
  • but when I tried to connect an odb file to mysql db via jdbc i get this error message:
    Error code: 1000
    The driver class ‘’ could not be loaded. /build/libreoffice-YUrEy7/libreoffice-7.0.1~rc2/connectivity/source/drivers/jdbc/JConnection.cxx:687

What is wrong?

EDIT
Installed mysql-jdbc connector from here: MySQL :: Download Connector/J, but nothing changed.
But I have mysql provided with lampp, therefore maybe a mysql provided from system is not loaded.

Hello,

Know almost nothing of lampp or symlinking the files. Can generate a very similar error if the JDBC driver class: is not specified.

From Base menu Edit->Database->Properties... the value for JDBC driver class: should be com.mysql.jdbc.Driver

Today I managed to solve this problem (I guess a bug): commenting the row skip-networking in my.conf (I mean now the line is #skip-networking, before it was skip-networking).
I have another problem with odb subforms, but I believe it is not here the place to resolve it.