Bug 135202 - LO 6.4.6.1 and 7.0.1 fail with error 1045 when accessing MySQL database using native connector
Summary: LO 6.4.6.1 and 7.0.1 fail with error 1045 when accessing MySQL database usin...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: x86-64 (AMD64) All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.0.0.beta2 tar...
Keywords: bibisectRequest, regression
: 135793 137276 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-07-27 15:29 UTC by Dan Lewis
Modified: 2020-12-27 12:53 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Error message for native password (18.12 KB, image/png)
2020-07-27 15:45 UTC, Dan Lewis
Details
Error message for SHA2 password (18.01 KB, image/png)
2020-07-27 15:46 UTC, Dan Lewis
Details
Error on Mint with Native connector (14.81 KB, image/png)
2020-08-06 04:39 UTC, Stang
Details
Error on Ubuntu with MySQL (Native & JDBC) (22.84 KB, image/png)
2020-08-06 04:40 UTC, Stang
Details
Help > About LibreOffice > (version info (29.76 KB, image/png)
2020-10-10 15:44 UTC, Dan Lewis
Details
Help > About LibreOffice IN MySQL (Native) using sh2 (215.00 KB, image/png)
2020-11-12 22:13 UTC, Dan Lewis
Details
Error message on attempt to connect to MySQL with native password (28.94 KB, image/png)
2020-11-12 22:15 UTC, Dan Lewis
Details
native password not working daily build 11/23/2020 (32.26 KB, image/png)
2020-11-24 21:44 UTC, Dan Lewis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Lewis 2020-07-27 15:29:28 UTC

    
Comment 1 Dan Lewis 2020-07-27 15:38:10 UTC
I had accessed a MySQL database using LO 6.4.5.2 with no problem. Then I noticed 6.4.6.1 was available so downloaded it and installed. I closed the database file that I had been using.After installation of 6.4.6.1, I used it to open the same database file. When using the same user name and password as I had earlier, I got an error message which I am taking a screenshot and will add this as an attachment. The error code is 1045. This was done with a native password. Then I modified the database file to use another user name and password which uses an sHA2 password. It too failed.
Comment 2 Dan Lewis 2020-07-27 15:45:05 UTC
Created attachment 163642 [details]
Error message for native password
Comment 3 Dan Lewis 2020-07-27 15:46:06 UTC
Created attachment 163643 [details]
Error message for SHA2 password
Comment 4 Dan Lewis 2020-07-27 15:50:25 UTC
Very important point: both were down with the native connector both for using LO 6.4.5.2 and 6.4.6.1.
Comment 5 Dan Lewis 2020-07-27 16:55:39 UTC
I have been able to successfully connect to a MySQL database using a JDBC driver using LO 6.4.6.1.
Comment 6 Robert Großkopf 2020-07-27 19:21:16 UTC
Have tested this with
Version: 6.4.6.1
Build-ID: 985dd72ca280d5c6da2e9f90f7ff9286cafe7ff8
CPU-Threads: 6; BS: Linux 4.12; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded
On OpenSUSE 15.1 64bit rpm Linux.

Could connect to MariaDB without any problem.
Comment 7 Dan Lewis 2020-07-27 20:42:54 UTC
There is a problem here. The version with the problem is LibreOffice 6.4.6.1 NOT 6.54.5.2. In fact, the latter is the only version of LibreOffice that has this problem
Comment 8 Alex Thurgood 2020-07-28 08:15:34 UTC
I would be inclined to set this as a DUP of bug 122560
Comment 9 Dan Lewis 2020-07-28 15:58:43 UTC
(In reply to Alex Thurgood from comment #8)
> I would be inclined to set this as a DUP of bug 122560

I disagree. These two bugs involve two different error codes (2058 for bug 122560 and 1045 for this bug). It was not until LibreOffice 6.2.3.1 that I was able to connect to a MySQL database using the native connector. However, I could connect to it using JDBC and the J connector from MySQL. In fact, I could gain access using either one of these connectors through 6.4.5.2. Now with 6.4.6.1, I can not access either one. (Since I run 6.3.6.2 in parallel, I still have access to the MySQL server and the databases it contains.)
Comment 10 Alex Thurgood 2020-07-29 08:32:23 UTC
@Dan : just to rule this possibility out, has your mysql server version changed recently ? Uprades ?
Comment 11 Alex Thurgood 2020-07-29 08:44:40 UTC
No repro for me with:

Version: 6.4.6.1
Build ID: 985dd72ca280d5c6da2e9f90f7ff9286cafe7ff8
CPU threads: 8; OS: Mac OS X 10.15.5; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded

Accessing via the mysql native connector : 
5.7.15-log
MySQL Community Server (GPL)
Comment 12 Dan Lewis 2020-07-29 12:53:31 UTC
(In reply to Alex Thurgood from comment #10)
> @Dan : just to rule this possibility out, has your mysql server version
> changed recently ? Upgrades ?

   Yes, it has: from 8.0.20 to 8.0.21. However, that was on June 17, 2020. I had then accessed the MySQL database many times using 6.4.5.2 until last weekend when I installed 6.4.6.1. The time between using the direct connector to successfully connect with 6.4.5.2 and failing to connect with 6.4.6.1 was 30 minutes. In both cases, I used the same database document file.
   I regularly download the latest releases of LibreOffice which include the 6.4.x ones. These include 6.4.2.2, 6.4.3.1, 6.4.3.2, 6.4.4.2, and 6.4.5.1. I used this same database document file to access the MySQL database with a native password.
Comment 13 Alex Thurgood 2020-07-29 13:30:31 UTC
(In reply to Dan Lewis from comment #12)

>    I regularly download the latest releases of LibreOffice which include the
> 6.4.x ones. These include 6.4.2.2, 6.4.3.1, 6.4.3.2, 6.4.4.2, and 6.4.5.1. I
> used this same database document file to access the MySQL database with a
> native password.

Not much else I can add then, sorry. 

So far, it works for me on macOS, and it works for Robert on openSuse, both of us with native connector and 6.4.6.1, although I am using a 5.7 branch of mysql, and I believe that Robert is using a mariadb instance.

I can only assume it is something more specific to do with your particular environment, unless someone else here has something similar.
Comment 14 Dan Lewis 2020-07-29 14:03:58 UTC
I have another database document file that uses MySQL J connector (8.0.21). This connects to the MySQL server with no problems. So, the problem seems to be with the direct connector for Linux. (I don't know if there is a problem with the Windows OS.)
Comment 15 Stang 2020-08-06 04:37:28 UTC
Can confirm there is a problem with MySQL(Native) connector and MySQL(JDBC) connector.  Regular JDBC to MySQL continues to work.

Libre Office:

Version: 6.4.3.2
Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

MySQL v5.7.31

MySQL(Native), MySQL(JDBC), JDBC all work.

Ubuntu 18.04

-----------------------

Mint Cinnamon 19.2

Version: 6.4.2.2
Build ID: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

MySQL v8.0.19

MySQL(Native) fails

JDBC works

MySQL(JDBC) works

------------------------


Ubuntu Mate 20.04

LO v7.0.0.3

MySQL v8.0.21

MySQL(Native) fails

JDBC fails  --  Note this started with latest server update

MySQL(JDBC) works


So the problem seems to be with MySQL 8.x server.

Will attach some error messages.
Comment 16 Stang 2020-08-06 04:39:22 UTC
Created attachment 163993 [details]
Error on Mint with Native connector
Comment 17 Stang 2020-08-06 04:40:28 UTC
Created attachment 163994 [details]
Error on Ubuntu with MySQL (Native & JDBC)
Comment 18 Alex Thurgood 2020-08-06 07:11:04 UTC
The plugin SHA caching error message is the same as that reported in bug 122560 with mysql 8.x servers because, as far as I understand it, our mysql connector library code doesn't support SHA caching which is the default in mysql 8.x servers.
Comment 19 Alex Thurgood 2020-08-06 07:38:24 UTC
For example, when installing 8.0.12 server on macOS Catalina, the following message is displayed:

Configure Mysql Server:

- Use Strong Password Encryption
MySQL 8 supports a new, stronger authentication method based on SHA256. All new installations of MySQL Server should use this method.

Connectors and clients that don't support this method will be unable to connect to MySQL Server. Currently, connectors and community drivers that use libmysqlclient8.0 support the new method

- Use Legacy Password Encryption
The legacy authentication method should only be used when compatibility with MySQL 5.x connectors or clients is required and a client upgrade is not feasible.
Comment 20 I.E. Saridakis 2020-08-16 17:39:53 UTC
*** Bug 135793 has been marked as a duplicate of this bug. ***
Comment 21 I.E. Saridakis 2020-08-16 17:43:35 UTC
Is this really a problem with Linux Mint 20 or the version of MySQL?
See my (duplicated) bug #135793 - the errors reported are different in LO 7.0.0.3 and 6.4.6.2 and, moreover 6.3.6.2 works just fine in the same environment.
Comment 22 Alex Thurgood 2020-09-03 09:35:27 UTC
No repro with 

Version : 6.4.5.2
Build ID : 1:6.4.5-0ubuntu0.20.04.1
Threads CPU : 4; OS : Linux 5.4; UI Render : par défaut; VCL: gtk3; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

- when accessing a remote mysql instance 5.7.15 on same LAN.


- when accessing locally hosted mysql Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu)) using old password system.
Comment 23 Alex Thurgood 2020-09-03 09:45:32 UTC
Repro with 

Version: 7.0.1.2 (Snap)
libreoffice 7.0.1.2, revision 191, latest/stable  canonical✓  -

Build ID: 88a63c56098013eb4038e11ebe7c8c0daab09aa8
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded


Error message:

Statut SQL: 28000
Code d'erreur: 1045

Plugin mysql_native_password could not be loaded:  /build/libreoffice/parts/libreoffice/build/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119
Comment 24 Alex Thurgood 2020-09-03 09:52:02 UTC
Might be specific to Ubuntu-provided packages...
Comment 25 Julien Nabet 2020-09-03 15:23:09 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.

However, we must precise that since several years, LO doesn't use Mysql lib but in fact MariaDB lib.
(mariadb-connector-c-3.1.8-src.tar.gz).
I know that MariaDB is a fork of Mysql but perhaps with the years, some differences appeared.
Ideally, I think a renaming of Mysql to MariaDB would be relevant but that's another story.
Comment 26 Alex Thurgood 2020-10-06 08:11:23 UTC
*** Bug 137276 has been marked as a duplicate of this bug. ***
Comment 27 Alex Thurgood 2020-10-06 08:14:23 UTC
From the comment on duplicate bug 132276, it looks like someone has hardcoded the path to the mariadb library
Comment 28 Alex Thurgood 2020-10-06 08:20:06 UTC
(In reply to Dan Lewis from comment #14)
> I have another database document file that uses MySQL J connector (8.0.21).
> This connects to the MySQL server with no problems. So, the problem seems to
> be with the direct connector for Linux. (I don't know if there is a problem
> with the Windows OS.)

Yep, someone has just reported the same problem under bug 137276. There, the error message points to a Unix path, which on Windows is nonsense of course...seems like something got hardcoded somewhere as to where to find the mysql_native_password plugin dynamic library.
Comment 29 Commit Notification 2020-10-08 08:13:27 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/cab3476aea0fc980951bf6e729879ecdc0d0e9b7

Related tdf#135202: declare libmariadb/secure/win_crypt in mk file for MariaDB

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 30 Julien Nabet 2020-10-08 18:46:28 UTC
I thought it might help but not sure. BTW, the patch concerns only Windows.
Comment 31 Commit Notification 2020-10-09 09:10:15 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/2db12ad6f3bd5103bed80db9798b88d81f2b59e6

Related tdf#135202: declare libmariadb/secure/win_crypt in mk file for MariaDB

It will be available in 7.0.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Julien Nabet 2020-10-09 17:14:34 UTC
It could be interesting someone who had some authentication pb on Windows give a try on next 7.0.3 or on a daily build.
However, don't expect much.
Comment 33 Dan Lewis 2020-10-10 15:42:07 UTC
   I downloaded and installed the daily shown in my attachment. I still can not connect to my MySQL database using the native connector.
   This is the error message I received:
Plugin caching_sha2_password could not be loaded:  /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119
Comment 34 Dan Lewis 2020-10-10 15:44:55 UTC
Created attachment 166255 [details]
Help > About LibreOffice > (version info
Comment 35 Julien Nabet 2020-10-10 16:19:08 UTC
Dan: just for curiosity what about native connection? (I mean without sha2 class algo authentication)
Comment 36 Dan Lewis 2020-10-10 19:41:21 UTC
(In reply to Julien Nabet from comment #35)
> Dan: just for curiosity what about native connection? (I mean without sha2
> class algo authentication)

MySQL(Native) is the connection that I use. I have no idea what you are asking. Are you referring to the older version of sending the password (standard authorization)? If so, I created another user using standard authorization. When connecting to the MySQL database, I got the same error message.
Comment 37 Alex Thurgood 2020-10-11 08:08:05 UTC
(In reply to Dan Lewis from comment #36)

> 
> MySQL(Native) is the connection that I use. I have no idea what you are
> asking. Are you referring to the older version of sending the password
> (standard authorization)? If so, I created another user using standard
> authorization. When connecting to the MySQL database, I got the same error
> message.

@Dan :

(1) Julien's patch only relates to the Windows version of LibreOffice, so if you are using a Linux version, which I believe you are, then the patch will have solved nothing for you.

(2) Julien's question to you does indeed refer to the old standard mysql authentication method. However, simply creating a new mysql user and configuring that user account to use the old authentication method won't necessarily work with a mysql server that is configured to use the new authentication method by default. This will very much depend on how you have configured your mysql/mariadb server.

The SHA caching plugin problem in general is linked to the lack of implementation for SHA authentication in the libmariadb connector (and possibly also the libariadbclient code, although I haven't check the MariaDB bug repository), which LibreOffice uses to connect to a mysql instance using the native connector.

There is additionally, what appears to be path error in recent builds of LibreOffice on all platforms, which attempts to load the SHA caching plugin from a location that does not exist on most users machines. Whether this path error stems from the LibreOffice build platform, or whether it is a fallback search path that is activated due to the lack of SHA caching support in the libmariadb client/connector code is, to me at least, unclear.

SHA2 caching support (or rather, the lack thereof) per se is bug 122560.
Comment 38 Commit Notification 2020-10-11 08:27:54 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ee8d735f0a59f41fb1f5cbabfe089c222ca948e3

Related tdf#122560 tdf#135202: build plugin caching_sha2_pw for MariaDb/Mysql

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 39 Julien Nabet 2020-10-11 09:56:49 UTC
This time the patch concerns all envs.
I added "caching_sha2_pw" not "sha256_password" because according to https://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html, because "caching_sha2_password is the default authentication plugin in MySQL 8.0 and provides a superset of the capabilities of the sha256_password authentication plugin, sha256_password is deprecated".
Also notice:
"
In the name sha256_password, “sha256” refers to the 256-bit digest length the plugin uses for encryption. In the name caching_sha2_password, “sha2” refers more generally to the SHA-2 class of encryption algorithms, of which 256-bit encryption is one instance. The latter name choice leaves room for future expansion of possible digest lengths without changing the plugin name. 
"
Hope it'll help. If it still fails, I'd be curious to see if it's still the same message or something else.
Comment 40 Commit Notification 2020-10-12 09:23:47 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/e3c2dcceb0e885a5a2c76bb69eac6e2dbba98d6d

Related tdf#122560 tdf#135202: build plugin caching_sha2_pw for MariaDb/Mysql

It will be available in 7.0.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 41 Buovjaga 2020-11-04 16:28:42 UTC
Dan: can you test with a 7.1 daily build? An easy way on Linux is to use an appimage https://libreoffice.soluzioniopen.com/
Comment 42 Dan Lewis 2020-11-04 17:04:15 UTC
(In reply to Buovjaga from comment #41)
> Dan: can you test with a 7.1 daily build? An easy way on Linux is to use an
> appimage https://libreoffice.soluzioniopen.com/

I downloaded yesterday's daily build for 7.1.0. It still does not work. The exact error message is:
SQL Status: 28000
Error code: 1045

Plugin caching_sha2_password could not be loaded:  /tinderbox/buildslave/source/libo-master/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119
   The build number is https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=a07be800db1e566be70f8a637988a1ffb2278262
Comment 43 Julien Nabet 2020-11-04 20:54:18 UTC
Michael: digging into Mariadb sources, I found this in plugins/auth/CMakeLists.txt
     69   # SHA256 caching plugin for MySQL 8.0 connection
     70   REGISTER_PLUGIN(TARGET caching_sha2_password
     71                 TYPE MARIADB_CLIENT_PLUGIN_AUTH
     72                 CONFIGURATIONS DYNAMIC STATIC OFF
     73                 DEFAULT DYNAMIC
     74                 SOURCES ${CC_SOURCE_DIR}/plugins/auth/caching_sha2_pw.c
     75                         ${CRYPT_SOURCE}
     76                 LIBRARIES ${CRYPT_LIBS})

then searching about CRYPT_SOURCE, I find in the same file:
      7 IF(WIN32)
      8   SET(CRYPT_SOURCE ${CC_SOURCE_DIR}/libmariadb/secure/win_crypt.c)
      9   SET(CRYPT_LIBS crypt32)
     10 ELSEIF(WITH_SSL STREQUAL "OPENSSL")
     11   SET(CRYPT_SOURCE ${CC_SOURCE_DIR}/libmariadb/secure/openssl_crypt.c)
     12   SET(CRYPT_LIBS ${SSL_LIBRARIES})
     13 ELSEIF(WITH_SSL STREQUAL "GNUTLS")
     14   SET(CRYPT_SOURCE ${CC_SOURCE_DIR}/libmariadb/secure/gnutls_crypt.c)
     15   IF (NOT SSL_LIBRARIES MATCHES "^.*\\.a$")
     16     SET(CRYPT_LIBS ${SSL_LIBRARIES})
     17   ENDIF()
     18 ELSE()
     19   UNSET(CRYPTO_PLUGIN)
     20 ENDIF()

My last patch for this bugtracker contained:
add of "UnpackedTarball/mariadb-connector-c/plugins/auth/caching_sha2_pw" in 
external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk

but should we do this:
- add UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt in external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
- add "#define WIN32 1" in external/mariadb-connector-c/configs/wnt_ma_config.h
- add "#define HAVE_OPENSSL 1" in external/mariadb-connector-c/configs/linux_my_config.h and mac_my_config.h
?
since sha2 needs cryptographic libs.
At least it builds locally (pc Debian x86-64 with master sources updated today, but can't really test since I use MariaDB not MySQL)

MariaDB proposes gnutls but it seems we use more often openssl
Comment 44 Michael Stahl (allotropia) 2020-11-05 12:36:34 UTC
(In reply to Julien Nabet from comment #43)

> but should we do this:
> - add UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt in
> external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk

... and win_crypt.c for windows.

> - add "#define WIN32 1" in
> external/mariadb-connector-c/configs/wnt_ma_config.h

this should be unnecessary, i mostly see _WIN32 being checked, and WIN32 is only around <dlfcn.h> but why would anything need that on windows?

> - add "#define HAVE_OPENSSL 1" in
> external/mariadb-connector-c/configs/linux_my_config.h and mac_my_config.h
> ?
> since sha2 needs cryptographic libs.
> At least it builds locally (pc Debian x86-64 with master sources updated
> today, but can't really test since I use MariaDB not MySQL)
> 
> MariaDB proposes gnutls but it seems we use more often openssl

yes this sounds reasonable, we can't use gnutls as it's not in external/.

also need this:

$(eval $(call gb_StaticLibrary_use_external,mariadb-connector-c,openssl))

oh, and it also needs adding to EXTERNAL_PLUGINS and BUILTIN_PLUGINS in UnpackedTarball_mariadb-connector-c.mk ...
the "caching_sha2_password_client_plugin", presumably...
Comment 45 Julien Nabet 2020-11-05 17:24:23 UTC
(In reply to Michael Stahl (CIB) from comment #44)
> (In reply to Julien Nabet from comment #43)
> 
> > but should we do this:
> > - add UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt in
> > external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
> 
> ... and win_crypt.c for windows.
Already there.

> 
> ...
Thank you for your feedback, I submitted https://gerrit.libreoffice.org/c/core/+/105376.
Comment 46 Commit Notification 2020-11-06 16:01:14 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8c9b8c5970a08c2ef0ccddb7a691f3731d39175a

tdf#135202: Mysql use openssl libs to be able to use caching_sha2_pw

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 47 Commit Notification 2020-11-11 08:53:59 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/482e5f8c2d2979b5d6c3b58194b8e37e7df7480e

tdf#135202: Mysql use openssl libs to be able to use caching_sha2_pw

It will be available in 7.0.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 48 Julien Nabet 2020-11-11 09:00:05 UTC
Let's remove 7.0.3 version since the last patch will be only on 7.0.4.

Dan Lewis: would you mind taking a try to the last daily build? I know that you must be fed up to be asked about this but if it still doesn't work, hope we'll have another error message to keep on investigation.
Comment 49 Dan Lewis 2020-11-11 13:16:03 UTC
(In reply to Julien Nabet from comment #48)
> Let's remove 7.0.3 version since the last patch will be only on 7.0.4.
> 
> Dan Lewis: would you mind taking a try to the last daily build? I know that
> you must be fed up to be asked about this but if it still doesn't work, hope
> we'll have another error message to keep on investigation.

I have downloaded the daily build dated 2020-11-10, installed it, and tested it. I do not know if the latest patch had been applied to this build or not, but it is still impossible. This is true when using the native password or sh2 cache. Here are the error messages:

SQL Status: 28000
Error code: 1045
Plugin mysql_native_password could not be loaded:  /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119

SQL Status: 28000
Error code: 1045
Plugin caching_sha2_password could not be loaded:  /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119
Comment 50 Julien Nabet 2020-11-11 13:19:54 UTC
Thank you Dan for your feedback.
Let's remove targets then since it still fails.
It's a pity the error message isn't more verbose to find what's the underlying pb.
Comment 51 Dan Lewis 2020-11-12 15:49:34 UTC
(In reply to Dan Lewis from comment #49)
> (In reply to Julien Nabet from comment #48)
> > Let's remove 7.0.3 version since the last patch will be only on 7.0.4.
> > 
> > Dan Lewis: would you mind taking a try to the last daily build? I know that
> > you must be fed up to be asked about this but if it still doesn't work, hope
> > we'll have another error message to keep on investigation.
> 
> I have downloaded the daily build dated 2020-11-10, installed it, and tested
> it. I do not know if the latest patch had been applied to this build or not,
> but it is still impossible. This is true when using the native password or
> sh2 cache. Here are the error messages:
> 
> SQL Status: 28000
> Error code: 1045
> Plugin mysql_native_password could not be loaded: 
> /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/
> mysqlc_general.cxx:119
> 
> SQL Status: 28000
> Error code: 1045
> Plugin caching_sha2_password could not be loaded: 
> /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/
> mysqlc_general.cxx:119

I have downloaded the latest daily build, installed, and ran it. I keep getting the very same error message for both the native password as well as caching sha2.
SQL Status: 28000
Error code: 1045

Plugin caching_sha2_password could not be loaded:  /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119. Could the problem be with tinderbox 70?
Comment 52 Julien Nabet 2020-11-12 21:04:52 UTC
(In reply to Dan Lewis from comment #51)
> ...
> Plugin caching_sha2_password could not be loaded: 
> /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/
> mysqlc_general.cxx:119. Could the problem be with tinderbox 70?

If you downloaded daily build from https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/current/, you got last updated from 2020-11-12.
So if it doesn't work with this daily build there's still a pb in LO code.

In other hand, https://dev-builds.libreoffice.org/daily/master/Win-x86@39/current/ isn't up-to-date since last builds are from 2020-10-30
Comment 53 Dan Lewis 2020-11-12 22:13:43 UTC
Created attachment 167243 [details]
Help > About LibreOffice  IN MySQL (Native) using sh2
Comment 54 Dan Lewis 2020-11-12 22:15:20 UTC
Created attachment 167244 [details]
Error message on attempt to connect to MySQL with native password
Comment 55 Dan Lewis 2020-11-12 22:20:15 UTC
(In reply to Dan Lewis from comment #53)
> Created attachment 167243 [details]
> Help > About LibreOffice  IN MySQL (Native) using sh2

At least a connection can now be made using sh2. This problem appears to be solved. However, there is still the problem with making a connection using the older method (native password). Obviously, a different Pb.I am happy with this much.
Comment 56 Julien Nabet 2020-11-13 06:30:00 UTC
(In reply to Dan Lewis from comment #55)
> ...
> At least a connection can now be made using sh2. This problem appears to be
> solved. However, there is still the problem with making a connection using
> the older method (native password). Obviously, a different Pb.I am happy
> with this much.

At last some good news! :-) What's the difference with last time? Did you download a more recent daily build?
About the older method, could you please indicate what you've got when you click on "More" button to have extra info?
Comment 57 Dan Lewis 2020-11-13 13:30:13 UTC
(In reply to Julien Nabet from comment #56)
> (In reply to Dan Lewis from comment #55)
> > ...
> > At least a connection can now be made using sh2. This problem appears to be
> > solved. However, there is still the problem with making a connection using
> > the older method (native password). Obviously, a different Pb.I am happy
> > with this much.
> 
> At last some good news! :-) What's the difference with last time? Did you
> download a more recent daily build?
> About the older method, could you please indicate what you've got when you
> click on "More" button to have extra info?

   Clarification: Attachment, Help > About LibreOffice IN MySQL (Native) using sh2, shows the daily build that I installed and connected to the MySQL database successful. Attachment, Error message on attempt to connect to MySQL with native password, shows what happened when I tried to connect using this same daily build with a password which uses the native password system.
   Added info using the "More" button: SQL Status: 28000
Error code: 1045

Plugin mysql_native_password could not be loaded:  /tinderbox/buildslave/source/libo-master/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119
   This looks very much like the all of the previous error messages.
Comment 58 Commit Notification 2020-11-22 08:34:16 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/51a7985f539b7760c22b19521ed2bf5c2df4b1c1

tdf#135202: Mysql declare more plugins for native password

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 59 Julien Nabet 2020-11-22 08:37:12 UTC
I hope the last patch may help for "native password" but not sure since I couldn't test it.
Of course, to give it a try, one's has to wait for a daily build which includes 51a7985f539b7760c22b19521ed2bf5c2df4b1c1
Comment 60 Commit Notification 2020-11-23 20:02:31 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/5de977a4ca344c4c3f288951504f58937fe64124

tdf#135202: Mysql declare more plugins for native password

It will be available in 7.0.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 61 Dan Lewis 2020-11-24 21:44:10 UTC
Created attachment 167547 [details]
native password not working daily build 11/23/2020
Comment 62 Dan Lewis 2020-11-24 21:48:16 UTC
(In reply to Dan Lewis from comment #61)
> Created attachment 167547 [details]
> native password not working daily build 11/23/2020

This is the error for this daily build:
SQL Status: 28000
Error code: 1045

Plugin mysql_native_password could not be loaded:  /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119
   I will download the daily build for 7.0.4.0+ tomorrow.
Comment 63 Julien Nabet 2020-11-25 06:04:33 UTC
Thank you for your last feedback.
Since we can't have more details, I don't know how we can guess the missing pluging.
I give up=>uncc myself
Comment 64 Dan Lewis 2020-11-26 13:21:12 UTC
(In reply to Julien Nabet from comment #63)
> Thank you for your last feedback.
> Since we can't have more details, I don't know how we can guess the missing
> pluging.
> I give up=>uncc myself

While it is disappointing not to be able to connect to a MySQL 8.0 database when using a native password, it can be done using a SH2 password. So, in this sense, the bug has been resolved. It only adds one step to do so: Set the Authentication Type to cashing_sh2_password. This information needs to be added to documentation and help.
Comment 65 Commit Notification 2020-12-02 09:40:52 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b746633b2b251695134e7f8c268a75e45cf97c82

tdf#135202 mariadb-connector-c: enable native_password plugin

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 66 Commit Notification 2020-12-02 14:13:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/9a33f502329f1818d972c52e561b1b2158fc3029

tdf#135202 mariadb-connector-c: enable native_password plugin

It will be available in 7.1.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 67 Commit Notification 2020-12-02 20:13:47 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/9ac5e72d01b3d95596b7c6aa8e701514c69b6f88

tdf#135202 mariadb-connector-c: enable native_password plugin

It will be available in 7.0.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 68 Dan Lewis 2020-12-08 15:44:02 UTC
(In reply to Commit Notification from comment #67)
> Michael Stahl committed a patch related to this issue.
> It has been pushed to "libreoffice-7-0":
> 
> https://git.libreoffice.org/core/commit/
> 9ac5e72d01b3d95596b7c6aa8e701514c69b6f88
> 
> tdf#135202 mariadb-connector-c: enable native_password plugin
> 
> It will be available in 7.0.5.
> 
> The patch should be included in the daily builds available at
> https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> https://wiki.documentfoundation.org/Testing_Daily_Builds
> 
> Affected users are encouraged to test the fix and report feedback.

I just downloaded the current daily build: libreoffice-7-0~2020-12-07_00.17.15_LibreOfficeDev_7.0.5.0.0_Linux_x86-64_deb.tar.gz. Then I installed it. Then I ran the same MySQL database which uses the Native driver. I was able to successfully connect to the MySQL Server using BOTH authorization type (native password and caching_sh256 password). The problem has been solved at least for the Debian versions of 7.0.5.0.0. I would have liked to have changed the status to RESOLVED, but I will leave that to others who have been doing this much longer than I.
Comment 69 Michael Stahl (allotropia) 2020-12-27 12:52:38 UTC
okay, so apparently with TDF builds of LO, using the native MariaDB/MySQL connector with:
* native password
* caching_sh256 password
works now, on all branches that aren't EOL .

so i think we should close this bug, and any problems using
* other authentication plugins
* other connectors for MySQL
* other builds of LO, such as Linux distro packages
should be tracked in new bugs.