•   
  • 1
  • 30
  • 31
  • 32
  • 33
  • 34(current)
HOW-TO:Share libraries using MySQL: Wiki Edition
hi, thanks so much for your reply.

That does go against all of the guides i have read though, as those i have looked through all say to export your library and then import it again, once the advancedsettings.xml file has been put in. i would certainly prefer not to have to rescan my entire library as there is quite a bit of customisation/custom movie sets that i would lose. 

once i use the advancedsettings.xml file and reboot, my library is empty (as i believe it should be). if i remove the file, i get my original library back (and an import works, so the issue isnt with my kodi configuration or my MiniPC). the import just doesnt work when i use the advancedsettings.xml file.

i have made sure port 3306 is open using powershell, as detailed in the guide i linked.

thanks for your advice though.
Reply
if it is any help whatsoever to anyone that could help me, my log is here:

https://paste.kodi.tv/egapubohuw

and the action where i clicked 'ok' on the import is line 1216 of that log.

thanks
Reply
I'll give you a hint. From your log: Access denied for user 'kodi'@'DESKTOP-4B2ODFK.home'

Freebie bonus hint: Get rid of the banned addons/repositories you have on there.
Reply
@garynitely

The forum moderators have determined that Banned_addons (wiki) are present on your system. To receive assistance here, these banned items must be removed. If a clean log is not submitted within 3 days, then the relevant post(s) will be removed after this time.
My Signature
Links to : Forum rules (wiki) | 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) | NFO_files (wiki) | Quick start guide (wiki)
Reply
appreciate the warning guys.

i believe i have gotten rid of everything, by all means correct me if i'm wrong:
https://paste.kodi.tv/olonegabux

i thought it might be denying me access to the miniPC (DESKTOP-4B2ODFK). could you advise on how to correct this? i'm still able to navigate to my files through kodi.

thanks again
Reply
First, just to make sure we're starting on the same page. When you followed the guide you linked, in Step 2, did you run this command exactly as they had it?

CREATE USER 'kodi' IDENTIFIED BY 'kodi';

The reason I ask is that the part after "IDENTIFIED BY" is the password for the user. Whether or not you changed it, that password is the one you should put into your advancedsettings.xml file. Just want to make sure you didn't mix the kodi (Step 2) and root (Step 2) passwords.

Assuming the above is all sorted out, if you go back into the MySQL Command Line Client and then run the following command:

SELECT * FROM mysql.user WHERE User = 'kodi';

The first column should be Host and it should have a % as its value. If that's not so, run these commands:

CREATE USER 'kodi'@'%' IDENTIFIED BY '{yourpasswordhere}';
GRANT ALL ON *.* TO 'kodi'@'%';
FLUSH PRIVILEGES;

(Re-)start Kodi with your MySQL advancedsettings.xml file in place, and see if it can connect (and create) the Kodi databases. (If you run the following command that @flhthemi posted within MySQL Command Line Client, it should show MyMusic60 and MyVideos107 databases):

SHOW DATABASES;
Reply
@runningnaked 

thanks so much, you're very first suggestion appears to have done the trick. just changed the password in the advancedsettings.xml file to 'kodi' and my library is now importing nicely, fingers crossed this will resolve everything, will do the same on my RPi once this has finished.

i had run the command properly in step two, but i had taken the instructions in step four to put in the 'username/password of your MySQL database' to mean the password i had selected for the MySQL server in step one! just a case of a rookie not following the instructions as carefully as i should have done. i clearly didn't read step two clearly enough, where it states that:CREATE USER 'kodi' IDENTIFIED BY 'kodi';
'The first portion of the first command creates the user, the second portion creates the password'
i never your have thought 'IDENTIFIED BY' related to the password in the advancedsettings.xml file. i basically did exactly as you suggested by mixing up the passwords.

thanks a lot, hugely appreciated!

Gary
Reply
Glad I could help. It can be tricky sometimes; I'm sure I had troubles the first time I tried setting it up myself too. The results were well worth it though! Enjoy!
Reply
well, i was very nearly there.

library updated just fine on the MiniPC (with MySQL installed on this device, external hard drive plugged into this).

however, my RPi doesn't want to play ball. advancedsettings.xml file installed, but nothing showing up in my library for movies. tv shows seem to show in the library, but no artwork and i get 'this file is no longer available' when i try to play.

oddly enough, in the submenu of Movies,'Recently added', i have a list of my recently added movies and if i try and play one, it asks if i wish to resume from the last resumepoint that i was watching on my MiniPC, indicating that something is working with MySQL. i can also find my movies (again, no artwork) my going into Video>Movies>Title. but again, they will not play.

Log:
https://paste.osmc.tv/izoxijerap

i am almost tempted to throw in the towel with it, but i've come this far! it seems like such a simple thing, but i agree that the results would be very much worth it, as it should run smoothly once i get it going properly.

any advice from anyone on this latest confusion would be very much appreciated again. i am sure it is something simply i am missing, just like last time.

thanks
Reply
My advanced settings looks like this:

Code:
<videodatabase>
<type>mysql</type>
<host>192.168.1.72</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</videodatabase>

Yours looks like this:
Code:
<videodatabase>
<host>192.168.1.98</host>
<user>kodi</user>
<pass>*****</pass>
<type>mysql</type>
<port>3306</port>
</videodatabase>

I don't know if the order of these items makes a difference or not. But you might check the advancedsettings.xml on your mini PC and see how the two compare.
Reply
(2018-05-16, 23:32)garynitely Wrote: library updated just fine on the MiniPC (with MySQL installed on this device, external hard drive plugged into this).

(...)

i get 'this file is no longer available' when i try to play.

Don't give up yet. We're almost there -- at least the MySQL connection is working from both devices.

2 questions:

Does the MiniPC have a static IP address or does it get its IP address via DHCP? If via DHCP, you will probably want to set a reservation for the MiniPC in your DHCP server (usually your router) so that it always has the 192.168.1.98 address. This way, the Pi will always be looking in the right place for the MySQL database.

Secondly, when you scanned your movies & tv shows in to the database, were they scanned directly from the external hard drive (eg: D:\Media\Movies\Avatar (2009)\Avatar (2009).mkv) or from the external hard drive via a shared folder source (eg: smb://DESKTOP-4B2ODFK/Movies/Avatar (2009)/Avatar (2009).mkv or smb://192.168.1.98/Movies/Avatar (2009)/Avatar (2009).mkv)? If directly (aka via a drive letter), then the Pi won't be able to access the file because there's no D: drive (for example) on the Pi. On your MiniPC, you'd have to share (as an example, I don't know your actual folder structure) the folder containing your media. In a Windows world, this would mean you'd be able to access it with something like \\DESKTOP-4B2ODFK\Media or \\192.168.1.98\Media. In Kodi, you'd set the movies' video source as, for example, smb://192.168.1.98/Media/Movies. This source would then be able to be understood and accessible by both the MiniPC and the Pi (and any other Kodi devices you later choose to add at home).

Sorry if you already did all of this or if it was too dumbed-down. It was just the first thing that came to mind.
Reply
not too dumbed down at all, my experience with this stuff is limited to following guides online, i'm just about keeping up with you as it is!

i feel like you hit the nail on the head again. i am almost certain that i scanned it into the library on the minipc directly from the external hard drive. i will rescan after adding it through smb (as it currently is on the Pi), so that both devices are looking in the same place. this is likely the cause, by the sounds of it.

i'd hoped to avoid rescanning my whole library as that means losing many custom settings such as movie sets. but another evening of organising is a small price to pay i guess. 

(full disclosure... i had no idea about the static IP address, I've fluked my way this far and have now just found an option in my router settings to 'Always use this IP address:' on the MiniPC and have told it to!)

thanks again, will report back, though possibly next week. fingers crossed
Reply
update:

library just started updating on the MiniPC... and the Pi library appears to be updating alongside it! played a movie on the MiniPC as it is updating, stopped the movie, then was able to resume the movie from the same point on the Pi!! Big Grin

it now looks to be running fine (though I've thought that before), i will just need to spend another evening sometime re-organising a few things.

thank you so much for your help @runningnaked , this is a really nice little feature, being able to have everything synced up. i really appreciate you helping me get it sorted.
Reply
That's great news! Despite being officially unsupported, the MySQL capability that they built into Kodi has been one of my favorite features.

One more thing -- If you add future movie files onto the hard drive (still attached to the MiniPC), you can scan them in to the library using the Pi (if it happens to be more convenient at the moment) as long as your video sources on the Pi are set up exactly as they are on the MiniPC. I usually just copy my sources.xml from one machine to the other for this, just like you did with the advancedsettings.xml.

In the interests of full disclosure, we could have probably manually altered the database entries to change them from the MiniPC's local drives to the smb network path. But just last week I was messing with my video database directly in SQL and wound up deleting all of my TV shows like an idiot. Took most of the next day at work to rescan and reorganize (trying to remember watched status etc.). So it's probably better I didn't give you advice on doing that! Wink
Reply
we got there in the end, so however you got me there, i'm happy!

just one minor gripe now though. i have both 'Movies' and 'Standup comedy' separated in my hard drive, and used to use smart playlists to organise my main window so that the standups showed up separate to regular movies (standup comedy shows are classed as movies in kodi). i created smart playlists to look at the path and then chose skin settings to display the smart playlist rather than just 'Movies'.

the smart playlists aren't showing any videos, even though the path is correct and shows smb://192.......

i'll play around when i have time after the weekend and try to fix it or find a workaround. but i have already managed to update the library with new videos from both the MiniPC and PI, so all working great now Smile
Reply
  •   
  • 1
  • 30
  • 31
  • 32
  • 33
  • 34(current)
 
Thread Rating:
  • 2 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
HOW-TO:Share libraries using MySQL: Wiki Edition52