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.
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
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
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
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';
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...
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?