Solved MySQL library empty
#1
Hello there,

I know this is not the way to go, but i need help with something that you seem to have done already so im reaching out to you from here.

I have Kodi 19.3 running, i have an sql database from the nas (synology, created with MariaDB10 and myphpadmin) but in Kodi it doesnt show the shows/films. I can see the database is created, i can see it connects and updates but the shows and films section is empty. I have this both on my pc and tv.

May i ask how did you set this up and is there something you know i might be missing in the setup?

Thanks,
Theceed
Reply
#2
@Theceed

I have split you into your own thread.

Start off with providing a Debug Log which captures you running an Update Library.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
Theceed, I'm assuming you've added the folders you wish to add to your library (on the NAS) as 'sources' in Kodi, and that you've navigated to the 'videos' category and set the media type  on each source by right-clicking / opening the context menu and selecting 'set content type' and selected the scraper relevant to the type of media your trying to add to the library, and when prompted if you 'want to update' clicked OK to start a scan of those added sources?

For a guide on how to set up your video library and sources, if you've not already done so, you might want to read THIS section in the Kodi wiki.

Smile

Dan / Gib.
Image
Reply
#4
Thanks, i just created a thread because i was thinking to do it the correct way, this is the question in that new post:

Dear all,

I am having some issues with Kodi 19.3 in combination with an SQL database, ill firstly describe what i have done and then ill describe the result/the issue.

I have a Synology NAS, with all my movies and tv shows on them. Been using this through NFS without issues, however since we have 3 places in the house we can watch i wanted to go to 1 central database. I created a setup using the following:
- MariaDB10
- PHPMyadmin

I have created both the advancedxml and the sources document and it seems like everything is working as it should. When i look in PHPmyadmin i can see that the video database is build (also there is a music database, but that one is empty for now) and in Kodi on my PC it shows the locations and it starts updating whenever i open Kodi. The only thing is...it is NOT showing the tv shows or movies in the sections in Kodi. I have looked at almost everything (i used a youtube tutoral to set it all up and followed it to the letter) but i just dont know what i can do with this. Kodi sees the locations, the database is created, Kodi updates the database on startup but it wont show any of the shows, its literally an empty field. It does not show the message that there is no location linked, it just shows an empty screen.

I am at a loss here, and i hope someone has the solution for me. I know my way around a pc and NAS, but im not a genius with it so i tried to keep it simple with 1 database for 3 devices. however now im making a local database again for the tv's since i cant watch anything with Kodi not showing the information in the databases...

Thanks to all who can help or all who will take the time to read this. 


As you can see, i did everything i need to do, but i cant get it to work. What do you want to see from me, i will try to get it out of kodi (im not that experienced with debugging but saw there was a page that shows how to do it so ill try)

Thanks for your help!
Reply
#5
This thread might highlight the same (or related) issue, to the one your experiencing...

https://forum.kodi.tv/showthread.php?tid=357217

Dan / Gib.
Image
Reply
#6
this seems to be my log: https://paste.kodi.tv/soneyobebu

Not sure if i can just post it here since it also has the IP in it, but i can see a lot of errors regarding the database. I can see in PhPMyadmin that the database exists, so i dont know why its giving this error?
Reply
#7
That log shows that while the SQL user Kodi is using can access the database, it either doesn't have sufficient rights to access the tables contained therein, or that those tables themselves don't exist.

If you can connect to the database server with a tool like HeidiSQL, verify that the databases on the server do contain the required tables, and if so, check that the user that Kodi is attempting to connect to the database with has sufficient access rights to access the database and tables it contains. You ideally need to set that user as a "SuperUser", and give it global access on everything. But at the same time, limit it to network access on the following IP:
 

That way only clients on your local LAN using that kodi user account will be able to access the databases. The above can be achieved in HeidiSQL by clicking the "users" icon in the toolbar, selecting the user-account kodi uses in the left-hand-pane and amending the "from host:" field. The password field below it will be 'hashed' for security, so don't amend that unless you actually WANT to change the connection password. In which case you would need to copy it to the "re-type password" field below. Finally, click "save" and the changes to the user account will be saved (and any password changes re-hashed). Then try and connect again.

Assuming the library / databases weren't properly created due to insufficient rights, you might want to right click on each database in HeidiSQL, in the left pane, and select "Drop Database". You will be warned / asked for confirmation before it actually does it. Then re-start Kodi and set your media libraries up again.

Dan / Gib.
Image
Reply
#8
thanks, i will take a look again at it.

I followed this tutorial to set it all up: https://www.youtube.com/watch?v=Plpaw1hlpWg

I can now see that the sources arent showing anymore (even though i have the sources.xml in there) so i manually added them to Kodi. I also removed the databases and i can see that both the music and video database is now created, and loaded with all info that i am adding now in Kodi. This tells me that the access should be ok, and hopefully now since i can see the shows it is also running from the SQL database and not locally. I will let Kodi do its magic overnight and hopefully tomorrow this issue is resolved, i will keep you posted on this.

Thanks for the time and effort you take to help me and others out on here!
Reply
#9
...Just to clarify for anyone else not familiar with the way Kodi sets up MySQL / MariaDB databases;

With each 'Major Version' update, Kodi creates *new* databases, and migrates the data across from the old ones to the new ones, leaving the old ones intact in case you should need to "roll back" to the earlier Kodi version. For this reason just setting all access rights on the databases Kodi is currently using isn't enough. It needs sufficient enough rights to create the new databases and migrate that data. So it needs GLOBAL (admin-level) access rights to the SQL server as a whole to facilitate this as global rights superceed database specific access rights. Limiting the allowed IPs as suggested above will limit the scope of devices able to use those priviledges, in case your running web-based apps that also access that SQL server, but that something for a different thread / topic.

Dan / Gib.
Image
Reply
#10
(2021-11-24, 01:54)Theceed Wrote: thanks, i will take a look again at it.

I followed this tutorial to set it all up: https://www.youtube.com/watch?v=Plpaw1hlpWg

I can now see that the sources arent showing anymore (even though i have the sources.xml in there) so i manually added them to Kodi. I also removed the databases and i can see that both the music and video database is now created, and loaded with all info that i am adding now in Kodi. This tells me that the access should be ok, and hopefully now since i can see the shows it is also running from the SQL database and not locally. I will let Kodi do its magic overnight and hopefully tomorrow this issue is resolved, i will keep you posted on this.

Thanks for the time and effort you take to help me and others out on here!

You ought to be able to see any (predefined) sources you've added by going to the "videos" category. Until you set the "content-type" on those sources, the "TV Shows" and "Movies" categories (from the home screen) won't show anything. On some skins it automatically redirects you to the "Videos -> Files" node if this is the case for either type, where you can add / define / set-up your sources and select scrapers etc. The Kodi Wiki has guides on how to do this.

Smile

Dan / Gib.
Image
Reply
#11
ok then....i really dont know how but....i made it work now...SmileSmile

Thanks for all the help here, i learned some new things from you that will help me for the future.
Reply
#12
Thread marked solved.
Reply
#13
(2021-11-24, 17:19)Theceed Wrote: ok then....i really dont know how but....i made it work now...SmileSmile

Thanks for all the help here, i learned some new things from you that will help me for the future.

Glad I could be of assistance.

Smile

Dan / Gib.
Image
Reply
#14
Hello,

this post is a few years old, but I'm currently encountering exactly the same problem as mentioned by the thread author. I'm trying to configure the database for a Synology NAS. The tutorial I used for it can be found here on the forum. I have to admit I did the Putty-part without understanding it, which may not have been the best idea... Then, I found a tutorial video on youtube (here, it's actually the same as mentioned in this thread).
When checking in phpmyadmin, I can see the database is created - its name is "MyVideos131" in Kodi 21. It contains every information needed (movies, genres, etc). I can access the files through "files" in Kodi, but the library remains empty. Now I installed the Kodi logfile uploader addon and uploaded the logfile. Is there anything you can tell from it?

The thread author seems to have solved the problem without knowing how:
Quote:ok then....i really dont know how but....i made it work now...
Would be nice if this also happens to me Wink

Thanks a lot!
Reply
#15
The "it works now, but I don't know why" works also for me :-D
After deleting the user and the database in myphpadmin, recreating the kodi user, rebooting the NAS and the PC and then launching kodi, it displayed the movies in the library. Even twice Laugh : I now have duplicates, one with the artwork and one without. But I'll look through this forum abd do a bit of research before opening an own thread for that. At least, I'm a few steps closer to what I want Wink
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL library empty0