DbLog Zugriff auf MySQL gibt Fehlermeldung: RSA Encryption not supported

Begonnen von GunterB, 05 Mai 2022, 08:37:41

Vorheriges Thema - Nächstes Thema

GunterB

Hallo zusammen,

ich habe auf meinem Ubuntu 20.04 Server MySQL und FHEM installiert und benutze die Datenbank auch von einem Raspberry mit FHEM.
/usr/sbin/mysqld  Ver 8.0.29-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))

Nach dem Neustart des MySQL bekomme ich mit dem dblog keine Verbindung, erst, wenn ich auf Windows einmalig das MySQL Workbench verbunden habe, funktioniert auch die Verbindung über FHEM DbLog.
Das betrifft den DBLog vom RPI und vom Server aus.

Könnte mir da jemand helfen?

Fehlermelung:
DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. at ./FHEM/93_DbLog.pm line 3254.
DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support at ./FHEM/93_DbLog.pm line 3254.

Code (DbLog auf dem Server) Auswählen
Internals:
   COLUMNS    field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
   CONFIGURATION db.conf
   DEF        db.conf .*:.*
   FUUID      61121d94-f33f-4fdf-6f4f-5c874f4fc96beb99
   FVERSION   93_DbLog.pm:v4.12.7-s25800/2022-03-08
   MODE       asynchronous
   MODEL      MYSQL
   NAME       logdb
   NR         34
   NTFY_ORDER 50-logdb
   PID        1080
   REGEXP     .*:.*
   STATE      DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. at ./FHEM/93_DbLog.pm line 3254.

   TYPE       DbLog
   UTF8       0
   dbconn     mysql:database=fhem;host=[server].[local];port=3306
   dbuser     fhem_log
   HELPER:
     COLSET     1
     DEVICECOL  64
     EVENTCOL   512
     OLDSTATE   DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. at ./FHEM/93_DbLog.pm line 3254.

     PACKAGE    main
     READINGCOL 64
     TC         current
     TH         history
     TYPECOL    64
     UNITCOL    32
     VALUECOL   128
     VERSION    4.12.7
   READINGS:
     2022-05-05 08:33:44   CacheUsage      0
     2022-05-05 08:33:44   NextSync        2022-05-05 08:34:14 or if CacheUsage 500 reached
     2022-05-05 08:33:50   state           DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. at ./FHEM/93_DbLog.pm line 3254.

Attributes:
   DbLogExclude .*
   DbLogSelectionMode Include
   asyncMode  1


Code (DbLog auf dem RPI) Auswählen
Internals:
   COLUMNS    field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
   CONFIGURATION ./db.conf
   DEF        db.conf .*:.*
   FUUID      611118b8-f33f-c3f2-8d6f-43b2df51f22166e4
   FVERSION   93_DbLog.pm:v4.12.7-s25800/2022-03-08
   MODE       asynchronous
   MODEL      MYSQL
   NAME       logdb
   NR         320
   NTFY_ORDER 50-logdb
   PID        6733
   REGEXP     .*:.*
   STATE      DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support at ./FHEM/93_DbLog.pm line 3254.

   TYPE       DbLog
   UTF8       0
   dbconn     mysql:database=fhem;host=[server].[local];port=3306
   dbuser     fhem_log
   HELPER:
     COLSET     1
     DEVICECOL  64
     EVENTCOL   512
     OLDSTATE   DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support at ./FHEM/93_DbLog.pm line 3254.

     PACKAGE    main
     READINGCOL 64
     TC         current
     TH         history
     TYPECOL    64
     UNITCOL    32
     VALUECOL   128
     VERSION    4.12.7
   READINGS:
     2022-05-05 08:38:31   CacheOverflowLastNum 0
     2022-02-05 09:48:04   CacheOverflowLastState normal
     2022-05-05 08:38:31   CacheUsage      2
     2022-05-05 08:38:31   NextSync        2022-05-05 08:39:01 or if CacheUsage 500 reached
     2022-05-05 08:38:36   state           DBI connect('database=fhem;host=[server].[local];port=3306','fhem_log',...) failed: RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support at ./FHEM/93_DbLog.pm line 3254.

Attributes:
   DbLogSelectionMode Exclude/Include
   asyncMode  1
   cacheOverflowThreshold 5000
   disable    0
   room       dblog

DS_Starter

Hallo Gunter,

hier gibt es Lösungsvorschläge: https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded

Vermutlich führt diese Lösung zum Ziel:


ZitatWe can avoid this error by make it work with old password plugin:

First change the authentication plugin in my.cnf file for Linux / my.ini file in Windows:

    [mysqld]

    default_authentication_plugin=mysql_native_password

Restart the mysql server to take the changes in affect and try connecting via MySQL with any mysql client.


LG
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

GunterB

Vielen Dank für die Hilfe!

Das default_authentication_plugin hat aus dem Beitrag nichts gebracht.

Aber der Hinweis weiter unten auf den User hatte Erfolg:

ALTER USER 'fhem_log' IDENTIFIED WITH mysql_native_password BY 'NewPassword';

betateilchen

Zitat von: GunterB am 05 Mai 2022, 12:38:43
Das default_authentication_plugin hat aus dem Beitrag nichts gebracht.

Aber der Hinweis weiter unten auf den User hatte Erfolg:

Naja, das Eine bedingt doch das Andere: Wenn Du das Authentifizierungs-plugin änderst, MUSST Du logischerweise auch dafür sorgen, dass es zum plugin passende credentials gibt.

Wenn Du eine elektrische Waschmaschine betreiben willst, musst Du ja auch dafür sorgen, dass der Stecker in der Steckdose ist und nicht nur dafür sorgen, dass an der Steckdose eine Spannung anliegt...
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

GunterB

Ja, leider fehlt mir hier Wissen.

Ich verstehe das so, dass der Eintrag in der Konfig dafür sorgt, dass der Default geändert wird.
Das betrifft dann alle neuen User?

Unabhängig davon kann ich für jeden User einen andere Authentifizierungsart auswählen?