Kodi stuck on loading screen with MySQL database
#1
Sad 
Hello,

I've been trying to configure my kodi devices to use a shared library for two days. I'm totally stuck. Whenever the advanced settings file is in there, it won't even go beyond the Kodi Omega screen..  I am not very savvy when it comes to DB etc, but I've tried a lot of things and can't seem to get it working. Any help would be most appreciated!

Info: 
MariaDB 10.11.8 on Truenas server
Kodi 21.1 on Libreelec (RPI 4)

Kodi Log: 
https://paste.kodi.tv/nokezabeto.kodi


Let me know if I can provide any additional information to solve this.
Reply
#2
> 2024-10-23 09:54:05.522 T:867 error <general>: Unable to open database: MyMusic83 [2002](Can't connect to server on '192.158.1.52' (115))

Kodi cannot connect to your db at the given endpoint.
Please ensure that you configured servername/IP + port + user + pass correct in advancedsettings.xml
Reply
#3
I've already checked that. Server is 192.168.1.52 , Port is 3306 as per default and I've created the kodi user on Mariadb. Could this be an issue on MariaDB side?
Reply
#4
update: I've tried connecting with root user from MariaDB. Same result. I'm really lost here.
Reply
#5
You do not face a Kodi problem. Something is misconfigured in your setup. advancedsettings.xml entry for server has to match the IP address of the machine hosting your db and ofc. the machine must be accessible via your network.  db configuration (port, user, pass) must match what you enter in advancedsettings.xml.
Reply
#6
There was a mistake in my advanced settings.xml . I am now able to boot into Kodi. Yet the shared library still doesn't work. 

Here is the new log:

https://paste.kodi.tv/qeliduhuku.kodi

To create the database I followed the steps on Kodi wiki. 

You're probably right this might not come from Kodi. But I've checked everything, it should be working. Thank you anyway,
Reply
#7
Looks like a permissions problem for the database user:
 
Code:
error <general>: Unable to create new database

Maybe you missed the "grant" commands.
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
#8
This is what I get when I check the grants 
Quote:+--------------------------------------------------------------------------------------------------------------+
| Grants for kodi@%                                                                                            |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO `kodi`@`%` IDENTIFIED BY PASSWORD '**' |
Anything looks wrong ?
Reply
#9
Those permissions look ok.
I read the last log too quickly and assumed the server connection problem was solved but that's probably still the problem (the error 115).
Could be on the Kodi PC (advancedsettings.xml file) or on the server side. To confirm which, you can install a mysql frontend on the Kodi computer and attempt a connection with the kodi user.
There could be a firewall, mariadb doesn't always come configured to listen to network connections, ...
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
#10
I found the solution!  It might sound super stupid be it did take me a while to find it so I'll share: 

First off, MariaDb has to accept connection, the only config that worked for me was to add bind-address = 0.0.0.0.0 in the .cnf file. This is clearly not the safest way, but it worked

Secondly, and more importantly, to make create the user on a Debian based Mariadb server, kodi wiki recommends to add: 
CREATE USER 'kodi' IDENTIFIED VIA mysql_native_password USING PASSWORD('kodi123#');

And, of course, I was stupid enough not to also change the password in the advancedsettings.xml as I just copied the version proposed by the wiki. 

I feel stupid for that, but at the same time, it might help a lost soul like mine.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi stuck on loading screen with MySQL database0