•   
  • 1
  • 33
  • 34
  • 35(current)
  • 36
  • 37
  •   
HOW-TO:Share libraries using MySQL: Wiki Edition
I have this set up on 2 RPi2s and MySQL without issues.

I’m trying to configure an Amazon FireTV but no matter what’s in advancedsettings it’s not working.

I’ve noticed it’s on 192.168.49.X do I’m wondering if anyone has this kind of setup working or because the RPi2s are on 18 and AFTV is only 17.6 maybe it won’t read the DB?

Any tips from anyone getting this to work on FireTV? Do I need to create a NEW db for my AFTV on 17.6?
Reply
(2018-05-28, 01:13)Gregtotheizzo Wrote: I’ve noticed it’s on 192.168.49.X

We can't tell if this is relevant information or not without knowing what IP address the MySQL server is using.

(2018-05-28, 01:13)Gregtotheizzo Wrote: or because the RPi2s are on 18 and AFTV is only 17.6 maybe it won’t read the DB?

Kodi 17.6 doesn't use the same database versions as Kodi 18 so even if you do get the FireTV working with MySQL you won't be able to share a common database with the RPi2 clients, not until all your clients are using the same version of Kodi.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
You could just update the AFTV to V18 and be done....unless it can't run V18.
Reply
Thank you! That worked!

Quick question.

Both AFTV are set to scan my source folder. Recently starting to see duplicates.

Should one be importing and scanning and one just pointing to the db as a slave?

I’m guessing having both scan is causing the dupes?
Reply
(2018-06-07, 03:56)Gregtotheizzo Wrote: Thank you! That worked!

Quick question.

Both AFTV are set to scan my source folder. Recently starting to see duplicates.

Should one be importing and scanning and one just pointing to the db as a slave?

I’m guessing having both scan is causing the dupes?

IF you have MySql setup properly any one of the devices you have connecting to it should be capable of updating the dbase. INITIALLY only ONE device should have library sources setup and THAT is the one you use to make the FIRST scan of your media by Kodi library. You can even delete the Kodi .db files AFTER you have it all working as MySql will get the info from then on. Also make sure you are using exactly the same lines for mysql in your advancedsettings.xml file on each device. You should probably have "Show Hidden Files and Directories" and "Allow File Renaming and Deletion" ON in Kodi Media Settings on all the devices. This way, if you want to do it, you can remove the dupes the hard way, one at a time, but I think if you clean Kodi's database it might get rid of the dupes. But before you clean you have to stop the one other device you have that also has media sources setup in it's library and remove the sources from it so it doesn't dupe what you're doing.
Reply
Hey!
Yesterday i bought a new Mac Mini. Now i'm trying to reconfigure everything, also MySQL which was working for me fine over years. 
I started with a clean install on MacOS Mojave. But for me the first thing from the Wiki isn't working.
Terminal told me something about:

connect to server at 'localhost' failed
error: 'Access denied for user 'root'@localhost (using password: NO)'


I have installed: 5.6.35 MySQL Community Server (GPL)

And have no clue after searching a lot of tips, how to proceed. Any tips ?
1st: Mac Mini: Intel i5 2,6Ghz - 8Gb Ram - Intel Iris - 1Tb - MacOS Mojave 10.14.1 - Kodi 18RC5.2 - MySQL 8.0.13 (Server)
2nd: iMac 27": Intel i5 2,8Ghz - 12Gb Ram - AMD 5750 1024Mb GFX - 1.128 Tb FusionDrive - MacOS High Sierra 10.13.6 - Kodi 17.6 - MySQL (Client)
3rd: Some Rasperries 
Server: Synology 916+
Reply
When you first install MySQL, it asks you to set up a password for the root user as part of the initial configuration.  That user/password combo is what you need to use to log into the MySQL command line.  Note that the MySQL 'root' user is nothing to do with any *nix 'root' user.

To login to the command line you should use mysql -u root -p where root is the root user for mysql (as set up when you first installed it).  Type in the password when prompted and you should be good to go.

If you can't remember the password you will have to reconfigure the MySQL package.  I don't know how to do this on a Mac, but on a Debian based Linux system I would do it with sudo dpkg-reconfigure mysql-server-5.6.35 .  It should then ask for a new password.
Learning Linux the hard way !!
Reply
Thx for feedback.
I have the right password, copy/paste worked not. 

Logging in wit this command worked not:

sudo /usr/local/mysql/bin/mysql

But with this:

mysql -u root -p

I also installed sequel pro. There i was able to create the user and set grants on all. I hope this will work.
1st: Mac Mini: Intel i5 2,6Ghz - 8Gb Ram - Intel Iris - 1Tb - MacOS Mojave 10.14.1 - Kodi 18RC5.2 - MySQL 8.0.13 (Server)
2nd: iMac 27": Intel i5 2,8Ghz - 12Gb Ram - AMD 5750 1024Mb GFX - 1.128 Tb FusionDrive - MacOS High Sierra 10.13.6 - Kodi 17.6 - MySQL (Client)
3rd: Some Rasperries 
Server: Synology 916+
Reply
Sounds like it should do.  You can check that the user you have set up has the correct privileges by logging into the command line with mysql - u root -p and then executing the following bit of code.

SHOW GRANTS FOR 'user'@'%'; substituting user with the user you created.  eg, for a user xbmc you would do this, and get the following reply.
Code:
mysql> SHOW GRANTS FOR 'xbmc'@'%';
+-------------------------------------------+
| Grants for [email protected]%                         |
+-------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'%' |
+-------------------------------------------+
1 row in set (0.00 sec)

mysql>
As long as that's right and you put the same username/password combo into your advancedsettings.xml, Kodi will have the right permissions to be able to create and modify it's databases as required from any machine on your local network.
Learning Linux the hard way !!
Reply
I am moving and with the new place I will finally have multiple devices running Kodi. I have been using MySQL for about 5 years now, but only with one Windows HTPC utilizing that db. The purpose was to setup an auto update of the library and not have to update on startup on my HTPC that I actually use to watch content. 

It has been great and does everything I want, but now that I have added a Nvidia Shield to the mix I have hit a big problem that I am not sure how to solve. When I originally setup MySQL and my Kodi sources I setup shared drives to my Unraid servers. So everything in Kodi and MySQL all point to drives Z: and Y:.  The Nvidia Shield has no clue what Z and Y are or how to reach them and I assume there is no way to actually map drives to letters on that OS. It's been years since I set this up originally and never thought forward enough to realize what I was doing to limit the DBs usefulness. So here I am asking if there is anyway to undo this silly mistake I made 5 or so years ago.

So, I copy over all the .xml files and other things mentioned in the Wiki, and the Shields install of Kodi fires up with all my content and everything looks great until I attempt to play something. It then pops up that the content is no longer in my library do I want to remove it? Is this simply my sources.xml file, or are all the paths to each piece of media I have on my servers in the MySQL database?  Is there a way to fix this? I have assumed the sources.xml files need to match on each instance of Kodi, but I could be way off and by editing this for the Shield, will it then find the media and the info from the db and play it back properly?  Thanks to any help you can provide, at work so I can't upload any logs ATM.
Reply
(2018-12-24, 22:07)Diggs Wrote: When I originally setup MySQL and my Kodi sources I setup shared drives to my Unraid servers. So everything in Kodi and MySQL all point to drives Z: and Y:.  The Nvidia Shield has no clue what Z and Y are or how to reach them and I assume there is no way to actually map drives to letters on that OS.
As I understand it the 'proper' way would be to have the same sources on each machine - ie use a network source rather than local on your pc.
But in my experience using path substitutions in advancedsettings.xml works perfectly.
Assuming you can actually see drives Y and Z from your shield (by whatever means - smb / nfs / ftp / etc) it's just a case of adding the right lines to your advanced settings.  Have a look in the wiki for details.
So something like:
Quote:        <pathsubstitution>
            <substitute>
            <from>Y:\whatchemacallit</from> (whatever's in your sources.xml)
            <to>smb://192.168.x.x/thingy/whatchemacallit</to>  (the actual path to the folder from the shield)
            </substitute>        
            <substitute>
            <from>Z:\thingumajig</from>
            <to>smb://192.168.x.x/wotsit/thingumajig</to>
            </substitute>
        </pathsubstitution>
Reply
I use this in ALL my advancedsettings.xml files. It works just fine for all my Android and Windows devices.

<videodatabase>
<type>mysql</type>
<host>192.168.1.XXX</host>
<port>3306</port>
<user>XXXX</user>
<pass>XXXX</pass>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.1.XXX</host>
<port>3306</port>
<user>XXXX</user>
<pass>XXXX</pass>
</musicdatabase>

Where X's = YOUR info. No need to map drives at all.

Now, I'm not sure not a dbase kinda guy, but once you have all those NEW devices added it might require a re-do of the database...i.e. drop it in in mysql and let one of the devices rebuild it. Like I say, not a dbase kinda guy so I just might be wrong. I'm sure someone will chime in and correct me.

Merry Christmas!
Reply
Thanks for the input folks. Between the holidays and the fact I am in between homes, I haven't had a chance to test this, but I did look at the Wiki and was a bit disspointed to see this.

2.9.3 pathsubstitution
Main page: Path substitution
Note: Path substition for "sources" and profiles is broken, and will NOT be fixed.
Path substitutions are for use for redirecting file paths. These are processed in order, and are useful for substituting an absolute path on a PC with a path suitable for Kodi to handle.
Default: No path substitutions defined.
Example:
<pathsubstitution> <substitute> <from>G:\dvds\</from> <to>smb://somecomputer/g-share/dvds/</to> <!-- Note the difference between the usage of forward and backslashes --> </substitute> </pathsubstitution>


Is anyone currently using "pathsubstitution" successfully?

I just don't want to introduce a problem if it is in fact broken.  But I do appreciate the information, if it will work it seems that is exactly what I need to do.
Reply
(2018-12-28, 21:35)Diggs Wrote: I just don't want to introduce a problem if it is in fact broken.  But I do appreciate the information, if it will work it seems that is exactly what I need to do.
Paths that require passwords are initially are the problem. After that, it's all 'YMMV'.
Got a Kodi problem? Provide us with a full Debug log (wiki) || Usefull pages: First time user (wiki) || Troubleshooting (wiki) || Free content (wiki) || Forum rules (wiki) || VPN policy (wiki)
Reply
I have been using a shared mysql database for a while,all the devices are using the current version of LibreElec, I want to install the latest LibreElec Release candidate but confused on how the upgrade process works with a shared database.

I understand all the devices will need to be upgraded to v18 Leia to share the same database, but my big question is will the current database be converted to match the new version during the first upgrade or must I start from scratch, add and scan all the sources for content?

Can someone point me to a simple how-to for upgrading v17- Krypton to v18- Leia when using a shared mysql database?

Thanks

joe
Reply
  •   
  • 1
  • 33
  • 34
  • 35(current)
  • 36
  • 37
  •   
 
Thread Rating:
  • 2 Vote(s) - 5 Average



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