Hi.
I'm trying to have a "central" video library using MySQL, so all my Kodi devices will have the same and synchronized library.
I followed this guide: MySQL - Official Kodi Wiki
It's an easy setup but I was not able to get working.
When my LibreELEC (Krypton) v7.90.008 ALPHA on Odroid C2 starts is not able to access to MySQL server (or this is the error) and it's not able to create the new Database (or this is the error).
See here the errors on LibreELEC side:
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic60 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic59 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic58 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic57 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic56 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic55 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic54 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic53 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic52 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic51 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic50 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic49 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic48 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic47 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic46 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic45 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic44 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic43 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic42 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic41 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic40 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic39 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic38 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic37 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic36 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic35 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic34 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic33 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic32 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyMusic60 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to create new database
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos107 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos106 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos105 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos104 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos103 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos102 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos101 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos100 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos99 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos98 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos97 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos96 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos95 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos94 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos93 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos92 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos91 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos90 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos89 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos88 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos87 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos86 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos85 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos84 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos83 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:547851628768 DEBUG: InitialiseFeature - using libCEC v3.1.0
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos82 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:547851628768 DEBUG: Initialise - initialised peripheral on 'AOCEC' with 2 features and 0 sub devices
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos81 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:547851628768 NOTICE: Register - new cec device registered on cec->AOCEC: CEC Adapter (0000:0000)
18:52:42 T:547818074336 DEBUG: Thread CECAdapter start, auto delete: false
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos80 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:547818074336 DEBUG: OpenConnection - opening a connection to the CEC adapter: AOCEC
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos79 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos78 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos77 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos76 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos75 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to open database: MyVideos107 [2003](Can't connect to MySQL server on '192.168.147.6' (101))
18:52:42 T:548212306144 ERROR: Unable to create new database
18:52:42 T:548212306144 NOTICE: Running database version TV29
18:52:42 T:548212306144 NOTICE: Running database version Epg11
18:52:42 T:548212306144 DEBUG: Initialize, updating databases... DONE
18:52:42 T:548296937472 NOTICE: start dvd mediatype detection
18:52:42 T:548296937472 INFO: DPMS: not supported on this platform
Display More
This is my advancedsettings.xml on LibreELEC:
<advancedsettings>
<cache>
<memorysize>52428800</memorysize>
<buffermode>1</buffermode>
<readfactor>10</readfactor>
</cache>
<videodatabase>
<type>mysql</type>
<host>192.168.147.6</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.147.6</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
</advancedsettings>
Display More
On MySQL Server side I have:
- Raspberry Pi 2 running MySQL version 5.5.52 (Linux raspberrypi 4.4.32-v7+ #925 SMP Wed Nov 16 21:39:23 GMT 2016 armv7l GNU/Linux)
- MySQL listening IP "bind-address" setted to 0.0.0.0 (it means all IPs)
- The port 3306 is opened and working
- No firewall
- I use others applications that use (connect, query, insert, etc..) other databases/instances on the same MySQL Server
- MySQL listen correctly on 0.0.0.0 port 3306, see here:
root@raspberrypi:~# netstat -a | grep -i sql
tcp 0 0 *:mysql *:* LISTEN
tcp 0 0 localhost:mysql localhost:50170 ESTABLISHED
tcp 0 0 localhost:50170 localhost:mysql ESTABLISHED
unix 2 [ ACC ] STREAM LISTENING 7159 /var/run/mysqld/mysqld.sock
unix 3 [ ] STREAM CONNECTED 7775 /var/run/mysqld/mysqld.sock
I was able to connect to MySQL over network:
root@raspberrypi:~# mysql --host=192.168.147.6 --user=kodi --password=kodi
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 137
Server version: 5.5.52-0+deb7u1 (Debian)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Display More
MySQL "kodi" user grants are OK:
mysql> SHOW GRANTS FOR 'kodi';
+--------------------------------------------------------------------------------------------------------------+
| Grants for kodi@% |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'kodi'@'%' IDENTIFIED BY PASSWORD '*2249595D6A53B38A77AA4AB2091D9B1A71F88735' |
+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Then on MySQL side is all OK.
The problem seem that LibreELEC does NOT connect to the database, I mean no MySQL ethernet traffic over the LAN from LibreELEC to MySQL Server....
See there a "tcpdump" executed on MySQL Server (192.168.147.6) when LibreELEC boot:
root@raspberrypi:~# tcpdump | grep -i 192.168.147.27
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
17:45:19.519243 ARP, Request who-has 192.168.147.1 tell 192.168.147.27, length 46
17:45:19.642388 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
17:45:19.642392 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
17:45:19.642394 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
17:45:19.642396 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
17:45:19.642398 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
17:45:19.642400 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
17:45:19.642402 IP 192.168.147.27.netbios-dgm > 192.168.147.255.netbios-dgm: NBT UDP PACKET(138)
17:45:19.643120 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
17:45:21.645307 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
17:45:21.645578 IP 192.168.147.27.netbios-dgm > 192.168.147.255.netbios-dgm: NBT UDP PACKET(138)
17:45:21.645581 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
17:45:22.683695 ARP, Request who-has 192.168.147.18 tell 192.168.147.27, length 46
17:45:22.683699 IP 192.168.147.27.netbios-ns > 192.168.147.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
Display More
As you can see LibreELEC (IP 192.168.147.27) does NOT try to connect to MySQL Server (tcpdump shows only netbios requests), there are NOT any requests/connections to MySQL (port 3306).
FYI, If I execute a "crude" telnet to MySQL Server on port 3306 from LibreELEC I can access to that port....
Any ideas?
Thanks!