Hallo
der FHem Installer empfihelt mit DBD::MariaDB zu installieren.
Nutze mysql als dblog
beim Installieren gibt es aber eine Fehlermeldung.
my sql läuft in der Version.
mariadb -V
mariadb Ver 15.1 Distrib 10.6.18-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
Braucht man dieses Modul DBD::MariaDB ?
Das Fehlerlog übersteigt meine Perl und Linux kenntnisse.
Danke für Hilfe und Tips.
VG Thomas
cpanm (App::cpanminus) 1.7046 on perl 5.034000 built for x86_64-linux-gnu-thread-multi
Work directory is /root/.cpanm/work/1728153468.1032842
You have make /usr/bin/make
You have LWP 6.61
You have /usr/bin/tar: tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching DBD::MariaDB () on cpanmetadb ...
--> Working on DBD::MariaDB
Fetching http://www.cpan.org/authors/id/P/PA/PALI/DBD-MariaDB-1.23.tar.gz
-> OK
Unpacking DBD-MariaDB-1.23.tar.gz
Entering DBD-MariaDB-1.23
Checking configure dependencies from META.json
Checking if you have DBI 1.608 ... Yes (1.643)
Checking if you have Getopt::Long 0 ... Yes (2.52)
Checking if you have File::Spec 0 ... Yes (3.80)
Checking if you have utf8 0 ... Yes (1.24)
Checking if you have warnings 0 ... Yes (1.51)
Checking if you have Config 0 ... Yes (5.034000)
Checking if you have Devel::CheckLib 1.12 ... Yes (1.16)
Checking if you have strict 0 ... Yes (1.12)
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.62)
Checking if you have Data::Dumper 0 ... Yes (2.179)
Configuring DBD-MariaDB-1.23
Running Makefile.PL
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see DBD::MariaDB::INSTALL,
section "C Compiler flags" or type
perl Makefile.PL --help
Cannot find the file 'mariadb_config' nor 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mariadb_config or mysql_config. Resorting to guessed values!
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MariaDB or MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';
For MySQL 8 it is needed to use different syntax:
mysql> create user 'root'@'localhost' identified by 's3kr1t';
mysql> grant all privileges on test.* to 'root'@'localhost';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
-> N/A
-> FAIL Configure failed for DBD-MariaDB-1.23. See /root/.cpanm/work/1728153468.1032842/build.log for details.
Expiring 104 work directories. This might take a while...
wenn ich dblog die Config checke sieht eigetnlich alles gut aus:
Available Drivers in your system
DBD::DBM, DBD::ExampleP, DBD::File, DBD::Gofer, DBD::Mem, DBD::Pg, DBD::Proxy, DBD::SQLite, DBD::Sponge, DBD::mysql
Result of version check
Used Perl version: 5.34.0
Used DBI (Database independent interface) version: 1.643
Used DBD (Database driver) version mysql: 4.050
Used DbLog version: 5.10.2
Your local DbLog module is up to date.
Rating:
Recommendation: Update of DbLog is not needed.
Your DBD version fulfills UTF8 support, no need to update DBD.
Result of configuration read check
Connection parameter store type: file
Connection parameter: Connection -> mysql:database=fhem;host=localhost;port=3306, User -> fhem, Password -> read o.k.
Rating:
Result of connection check
Connection to database fhem successfully done.
The time required to establish the connection was 0.0084 seconds.
Communication Compression between Client and Server: off
Rating:
Recommendation: settings o.k.
Result of Character Sets and Collation check
Character Set used by Client (connection): UTF8MB4
Collation used by Client (connection): UTF8MB4_BIN
Character Set used by DB fhem: UTF8MB4
Collation used by DB fhem: UTF8MB4_BIN
Rating:
Recommendation: settings o.k. Your DBD version fulfills UTF8 support, no need to update DBD.
Result of insert mode check
Insert mode of DbLog-device logdbSQLLite is: Array
Rating:
Recommendation: settings o.k.
Result of plot generation method check
WEB8083S: plotfork=1 / plotEmbed=2 / longpollSVG=0
WEB8086: plotfork=1 / plotEmbed=2 / longpollSVG=0
WEBphone8084: plotfork=1 / plotEmbed=2 / longpollSVG=0
WEBphone8085: plotfork=1 / plotEmbed=2 / longpollSVG=0
Rating:
Recommendation: settings o.k.
Result of table 'history' check
Column width set in table history: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Column width used by device logdbSQLLite: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Rating:
Recommendation: settings o.k.
Result of table 'current' check
Column width set in table current: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Column width used by device logdbSQLLite: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Rating:
Recommendation: settings o.k.
Result of check 'Search_Idx' availability
Index 'Search_Idx' exists and contains recommended fields 'DEVICE', 'TIMESTAMP', 'READING'.
Rating:
Recommendation: settings o.k.
Result of check 'Report_Idx' availability for DbRep-devices
At least one DbRep-device assigned to logdbSQLLite is used. Index 'Report_Idx' exists and contains recommended fields 'TIMESTAMP', 'READING'.
Rating:
Recommendation: settings o.k.
Moin,
ja, Du benötigst DBD::MariaDB! MariaDB ist der (offene) Nachfolger von MySQL und auf dem System ist ja auch MariaDB installiert gemäß Deinen Angaben.
DBD::MariaDB ist das Perl-Backend, um MariaDB bzw. MySQL-Datenbanken ansprechen zu können.
Der Fehler, der bei Dir geworfen wird (Failed to determine directory of mysql.h), bedeutet, dass Du die devel-Pakete im Betriebssystem für den MariaDB Client noch installieren musst, damit das Perl-Module DBD::MariaDB erfolgreich übersetzt werden kann.
In aller Regel bieten die Distributionen aber dieses Perl-Module schon fertig kompiliert an. Suche doch einfach mal bei Deiner Distri nach dem Paket. Bei OpenSUSE leap wäre das z.B.
zypper se perl | grep -i maria
i+ | perl-DBD-MariaDB | MariaDB and MySQL driver for the Perl5 Database Interface (DBI) | package
Hi
danke für die Antwort.
Verstehe gar nicht wieso es dann bei mir loggt ohne den Perl Treiber und der nur als Empfohlen angegeben ist?
Habe ubuntu als os
konnte es lösen mit mysql_config --cflags
mariadb pfad mysql.h (https://www.reddit.com/r/C_Programming/comments/1d6idzg/fatal_error_mysqlh_no_such_file_or_directory/)
Fhem verwendet IMHO per default keine Datenbank - die musst Du explizit einrichten, wenn Du das Logging in eine DB haben möchtest. Default ist dateibasiertes Logging.