I tried with this in /storage/.kodi/userdata/addon_data/service.mariadb/my.cnf and I got log file with bunch of lines from Kodi.
Code
general_log_file = /storage/.kodi/userdata/addon_data/service.mariadb/mysql.log
general_log = 1
Code
LibreELEC:~ # cat /storage/.kodi/userdata/addon_data/service.mariadb/mysql.log
/storage/.kodi/addons/service.mariadb/bin/mysqld, Version: 10.3.11-MariaDB-log (MariaDB Server). started with:
Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock
Time Id Command Argument
190110 13:07:30 8 Connect kodi@<IP_REMOVED> as anonymous on
8 Query SET NAMES utf8
8 Query SET SESSION sql_mode = (SELECT REPLACE(@@SESSION.sql_mode,'ONLY_FULL_GROUP_BY',''))
8 Query SELECT @@SESSION.optimizer_switch
8 Query SET SESSION optimizer_switch = 'derived_merge=off'
8 Query SHOW DATABASES LIKE 'MyVideos113'
8 Query SHOW TABLES LIKE '%'
8 Init DB MyVideos113
8 Query SHOW DATABASES LIKE 'MyVideos113'
8 Query SHOW TABLES LIKE '%'
8 Query SELECT idVersion FROM version
8 Quit
Display More
start/stop/restart the mariadb service
Code
systemctl stop service.mariadb
systemctl start service.mariadb
systemctl restart service.mariadb
Kodi user can't connect on localhost but only on real ip address. That's why you need to use -h parameter
I assume user kodi@localhost doesn't even exist according to what is created: LibreELEC.tv/mariadb.start at master · LibreELEC/LibreELEC.tv · GitHub
I'm not mysql user so something can also be wrongly implemented.