Kodi SQL issue
#1
I have 2 profiles.  The first one is named Nick and the second one is named Tara.  I had everything up and working well and decided to reinstall kodi on a machine.  I have a separate advancedsettings file in each profile folder that points to different databases.  Now, the Nick profile logs into mysql as user-kodi and the DB that was auto created starts with Myvideos, Mymusic, etc.  After a clean install, before adding any video files in kodi, I log in under the Nick profile and all of my videos and tv shos show up.  Perfect.  I looked in the log and it's connecting to the Myvideos116 DB which is correct.  For the Tara one though, it logs into mysql with username Tara and auto creates the DB of TaraVideos, TaraMusic, etc.  After the fresh install, logging in as Tara doesn't populate an of the videos or tv shows.  I checked the log and its hooking on to the Tara116 DB which is correct and contains all the videos/tvShows for that profile.  But they didn't all auto populate.  I'm sure I can go to add videos and put all the sources back in but I don't understand why the Nick profile grabbed everything but the Tara profile doesn't.  Is there some sort of issue where kodi only works when grabbing the default DB name?  I was going to change the name of the myvideos116 db to nick116 and change the username from kodi to nick but im afraid it too would stop auto populating the videos.  Anyone have any thoughts/experience on this?  Thanks in advance.
Reply
#2
(2019-10-09, 03:06)nolos Wrote: I have 2 profiles.  The first one is named Nick and the second one is named Tara.  I had everything up and working well and decided to reinstall kodi on a machine.  I have a separate advancedsettings file in each profile folder that points to different databases.  Now, the Nick profile logs into mysql as user-kodi and the DB that was auto created starts with Myvideos, Mymusic, etc.  After a clean install, before adding any video files in kodi, I log in under the Nick profile and all of my videos and tv shos show up.  Perfect.  I looked in the log and it's connecting to the Myvideos116 DB which is correct.  For the Tara one though, it logs into mysql with username Tara and auto creates the DB of TaraVideos, TaraMusic, etc.  After the fresh install, logging in as Tara doesn't populate an of the videos or tv shows.  I checked the log and its hooking on to the Tara116 DB which is correct and contains all the videos/tvShows for that profile.  But they didn't all auto populate.  I'm sure I can go to add videos and put all the sources back in but I don't understand why the Nick profile grabbed everything but the Tara profile doesn't.  Is there some sort of issue where kodi only works when grabbing the default DB name?  I was going to change the name of the myvideos116 db to nick116 and change the username from kodi to nick but im afraid it too would stop auto populating the videos.  Anyone have any thoughts/experience on this?  Thanks in advance.

Just a small update.  I thought maybe since I wasn't using the <name> tag in the advancedsetting.xml for the Nick profile that might be what was causeing it to work correctly.  Meaning that it wasn't trying to negotiate that name tag and also that it was using the default MyVideos table.  To test, I added the <name>nick</name> to the file and logged on.  There was immediately a new table in the DB called nick116 and it was oddly filled with all the videos from the other database.  So the name tag seems to not be the culprit.  As for the videos/shows being all there in the new nick116 table I can only assume that, upon first log in with the <name> tag in place, kodi created a new, blank table called nick116 and since all the videos/shows were already in the nick profile on kodi, it copied them to the sql db from there.  hope i didn't lose everybody there.  I know I can just go to the videos section and add the source folders for the Tara profile and they would all populate in kodi and then hopefully syn up with the watched status of the ones in the tara116 table, BUT since the Nick profile pulled in all my videos/shows without having to add the sources in the videos section I would like it if the Tara profile did the same.    Anyway, any thoughts?
Reply
#3
To receive meaningful assistance you will need to provide a full debug log.

The instructions are here... debug log (wiki)

If you are using the Basic Method, then ensure the following is applied...
1.Enable debugging in Settings>System Settings>Logging,
2.Restart Kodi
3.Replicate the problem.
4.Upload the log to Kodi Paste Site manually or use the Kodi Logfile Uploader. (wiki) With either method post the link to the log back here.

If you are using the Advanced Method ensure you have correctly created and applied the advancedsettings.xml file (wiki)

In both instances, you should see the word DEBUG throughout the log.

Note: Full logs only. No partial or redacted logs
Do NOT post your logs directly into the forum. Use the Kodi Paste Site. Post the link to your pasted log in the forum
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
#4
I have both logs.  When I try to paste it in paste.kodi.tv it says it's too big.  One file is 1mb and the other (which I haven't tried yet) is 70kb.  I can slim it down a bit by removing the refrences to it scraping my movies but I don't want to delete anything that might be useful.  Not sure why it would be too big.  Its a fresh install with no addons installed really.  Is there another place where I can get a larger filesize limit?  Thanks.
Reply
#5
Please don't delete anything in the log. Invariably, it is the lines that we need to see that end up being deleted for some reason.

Try https://paste.ubuntu.com/ for the larger log. The 70kb log should work at Kodi Paste Site which can accept up to approx 8000 lines of log.
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
#6
(2019-10-11, 00:59)Karellen Wrote: Please don't delete anything in the log. Invariably, it is the lines that we need to see that end up being deleted for some reason.

Try https://paste.ubuntu.com/ for the larger log. The 70kb log should work at Kodi Paste Site which can accept up to approx 8000 lines of log.

TY, here is the one for the Nick profile. I did a fresh install of kodi, added the advancedsetting.xml to the profile folder, and all my movies appeared in the movie section with their correct watched status and all my TV shows appeared in the TV Shows section with their correct watched status.  I did not have to add any media sources.
https://paste.ubuntu.com/p/H92SZD9Y7F/

and here is the one for the Tara profile.  I followed the same procedures for this profile as the Nick profile, however, when I log in there are no movies or TV shows like there is in the Nick profile.  I just have the screen that has the buttons to add files or remove menu item 

https://paste.ubuntu.com/p/Jn2bHf2XMK/
Reply
#7
Ok, thanks.

The second log for Tara is incomplete. I guess you grabbed the log before exiting kodi so a portion of the log was not written.

One thing that stands out is the following, and it is know to cause problems, but whether it is responsible for this issue I do not know. Others with more experience with MySQL will need to advise...

xml:
WARNING: MYSQL: Your database server version 5.5.42 is very old and might not be supported in future Kodi versions. Please consider upgrading to MySQL 5.7 or MariaDB 10.2.

Maybe @Klojum might know what the problem is.
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
#8
(2019-10-11, 01:12)nolos Wrote: however, when I log in there are no movies or TV shows like there is in the Nick profile

This is of course a subtle hint... Your database server version 5.5.42 is very old and might not be supported in future Kodi versions..

Let's upgrade that database server first to keep things up-to-date. It may not be the actual problem, but ... I can't rule it out either. Do a full MySQL backup/dump of your databases before upgrading to be on the safe side.

Then update to v5.7.27 via https://dev.mysql.com/downloads/installer/ , click the "Looking for previous GA versions?" option.

After the upgrade, import your database data if necessary, and run Kodi again. If you have enabled a "Library update on startup" option, disable it for the time being so your log files will not get insanely large.
Reply
#9
(2019-10-11, 07:06)Klojum Wrote:
(2019-10-11, 01:12)nolos Wrote: however, when I log in there are no movies or TV shows like there is in the Nick profile

This is of course a subtle hint... Your database server version 5.5.42 is very old and might not be supported in future Kodi versions..

Let's upgrade that database server first to keep things up-to-date. It may not be the actual problem, but ... I can't rule it out either. Do a full MySQL backup/dump of your databases before upgrading to be on the safe side.

Then update to v5.7.27 via https://dev.mysql.com/downloads/installer/ , click the "Looking for previous GA versions?" option.

After the upgrade, import your database data if necessary, and run Kodi again. If you have enabled a "Library update on startup" option, disable it for the time being so your log files will not get insanely large.  
Yes, I had noticed that line a few times in there, but like you two, wasn't leaning toward it being the problem.  I did go ahead an update it though just to be safe last night.  I grabbed the newest version and put it on there.  It now has v8.0.17 server.  Restarted everything but no dice.  I turned off the library updates and got you a new, hopefully complete file, this time.  Here's the link.  I'm still brainstorming too but about out of ideas.  There are no setting that I see in the tables that could be different between the 2 profiles. There's just videos and their watched status is all that's in the DB I guess.

https://paste.ubuntu.com/p/q4ChWq3shz/
Reply
#10
Okay, it will be interesting to see if MySQL v8 behaves with Kodi, it could have its own quirks.

One more thing you could do is enable the Database Component in the Debugging section of Kodi.
That way you should also see the SQL queries fly by.
But do restart Kodi when you have enabled that settings for a clean new log.
And after that, reproduce your error(s), and provide the newest log file.
Reply
#11
(2019-10-11, 15:59)Klojum Wrote: Okay, it will be interesting to see if MySQL v8 behaves with Kodi, it could have its own quirks.

One more thing you could do is enable the Database Component in the Debugging section of Kodi.
That way you should also see the SQL queries fly by.
But do restart Kodi when you have enabled that settings for a clean new log.
And after that, reproduce your error(s), and provide the newest log file.
I might have found the problem...or at least part of it.  I enabled the debug for the database like you suggested and started running the same queries in workbench to see the results.  So the movie table is empty now for some reason. So is the episode table.  It's weird because several others that seem like they would have depended on that info in order to get their info are still there.  For example, the actors table is still full of info, the tvshows table has all my shows but yet the episode one is empty.  I'm guessing this is causing some confusion.  I'll do some more digging but im guessing that info is gone since my backup before updating the SQL is missing it too
Reply
#12
Empty movie and tvshow database tables can mean only one thing: start all over with the scraping of your video collection. If you have done a Video Library Export, that will help a lot.

SELECT * FROM movie;
SELECT * FROM tvshow;

If those return no records, then start rescraping your media collection.
Reply
#13
(2019-10-12, 01:03)Klojum Wrote: Empty movie and tvshow database tables can mean only one thing: start all over with the scraping of your video collection. If you have done a Video Library Export, that will help a lot.

SELECT * FROM movie;
SELECT * FROM tvshow;

If those return no records, then start rescraping your media collection.
Ya, I hear ya. I am doing just that.  I'll let ya know of I come up with any other findings.  Thanks for the info.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi SQL issue0