v21 Kodi 21RC1 can't connect to mysql db
#1
So I installed Kodi 21 RC1 on Win 10 x64 (on top of working 21 B1, so had working settings before updating) but now it won't connect to MariaDB on  Synology NAS, windows is returning error 10061.  Looking at the logs it is attempting to connect using ipv6
error : Unable to open database: MyMusic83 [2002:
(Can't connect to MySQL server on 'fe80::211:32ff:fe9d:8e78' (10061))]
, but earlier 21 betas it looks like always using ipv4.  I don't have any experience with configuring LAN for ipv6.  Reverted Kodi back to B1 and it is connecting to MariaDB again.

Any ideas on how to troubleshoot ipv6?

______________________________  UPDATE
Haven't tried it yet (this is my production system and don't really want to experiment with bad results)
From reading it seems that using a "cookbook recipe" for getting mysql set up on server, I used the "%" wlidcard for user "kodi".  It seems that "%" only works for ipv4 addresses and I have to add the specific ipv6 link-local address for each device that will be connecting to the library db.  It looks like I need to add new rows in both mysql/user and mysql/db tables (can do with Heidi SQL).

scott s.
.
Reply
#2
Looks like the mariadb connector hasn't changed since 2020 so not sure what caused this or whether it's on purpose or not.
Can you bisect it?
At least beta2 and 3 installers are still available and maybe the archived nightlies go back far enough.
I don't have ipv6 on my lan and can't test.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
If you turn off IP6 on your LAN adapter so that protocol isnt available, maybe it will force KODI to use IP4 again ?
Reply
#4
That's probably true.  I don't recall a Kodi PR that affected this.  It could also be that my advancedsettings references the device name rather than ipv4 address so I suspect the issue is how Kodi gets the address from device name in Windows 10.

xml:
<musicdatabase>
        <type>mysql</type>
        <host>KAKANAS2</host>
        <port>3307</port>
        <user>kodi</user>
</musicdatabase>

scott s.
.
Reply
#5
sure there are ways to avoid the problem, but with everything identical except for the Kodi version it's strange.
or do you have a separate folder per version and maybe some other differences...
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
Did some testing.  As I expected, when I changed advancedsettings.xml to specify the ip4 address instead of host device name RC1 runs.  From some testing I believe this is a regression from PR#24209  Network: dns lookup can return an IPv6 address.  At least the description in the PR doesn't suggest to me this was intended result.

What I think happens is that in Windows 10 (probably 11 too) as a result of this PR in a dual-stack (which I think is default on these windows version) when the host device name for the MySQL db is resolved Kodi is getting the ipv6 link-local address for the MySQL host and attempting to connect using ipv6 link-local addresses (I don't have ipv6 set up on my modem to ISP connection so can't test other ipv6 addresses).  That would be OK except that I didn't have a MySQL kodi user setup from ipv6 client, only set "%" which in MySQL is a wildcard for ipv4 but not ipv6.

Alternatively it might be OK to put a warning in the Wiki for MySQL setup if this is actually the intended behavior after 24209.

This BTW is ipconfig /all on this Kodi host:

Code:
Ethernet adapter KakaNet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel® Ethernet Connection (7) I219-V
   Physical Address. . . . . . . . . : 70-85-C2-CD-36-16
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::8872:eb49:baef:e745%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.22.113(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, 22 February 2024 15:20:05
   Lease Expires . . . . . . . . . . : Friday, 8 March 2024 15:20:58
   Default Gateway . . . . . . . . . : 192.168.22.22
   DHCP Server . . . . . . . . . . . : 192.168.22.22
   DHCPv6 IAID . . . . . . . . . . . : 91260354
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-32-34-EF-70-85-C2-CD-36-16
   DNS Servers . . . . . . . . . . . : 192.168.22.22
   NetBIOS over Tcpip. . . . . . . . : Enabled

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 21RC1 can't connect to mysql db0