• 1
  • 35
  • 36
  • 37(current)
  • 38
  • 39
  • 41
HOW-TO:Share libraries using MySQL: Wiki Edition
(2019-03-18, 16:01)mataus19 Wrote: You mention SQ Lite... can this be used on a QNAP NAS?
SQLite is the 'normal file' based version of MySQL server.
You can only install MySQL or its sister MariaDB onto your NAS.
SQLite is not designed for NAS devices.
Reply
(2019-03-18, 16:35)Klojum Wrote: SQLite is the 'normal file' based version of MySQL server.
You can only install MySQL or its sister MariaDB onto your NAS.
SQLite is not designed for NAS devices.

Ok Thanks for the info. do all machines running kodi have to have the same kodi version when using MariaDB too?
Reply
(2019-03-14, 04:53)Milhouse Wrote:
(2019-03-14, 00:11)mataus19 Wrote: Hi,

I have recently chaned my Pi2 OS from LibreElec to OSMC. I also have a NUC running latest version of LibreElec. I have MySQL setup on my NAS. The NUC and Pi2 (when running LibreElec) worked fine with MySQL.

However since changing the Pi2 from LbreElec to OSMC I cannot get the NUC and Pi2 to sync using MySQL. I am using the same 'advancedsettings.xml'

In order to use MySQL do you have to have all machines using the same OS, e.g. LibreElec? Also do all machines have to be running the same version of Kodi? I only ask because the NUC is running latest version LibreElec 9.0 (Kodi Leia V18.1) but the Pi2 is running latest version of OSMC compiled 31/12/18 (Kodi Kyrpton V17.6)

Thanks!
Different Kodi releases use different database versions, Kodi 18.x and Kodi 17.x are not compatible so yes, in simple terms, you need to use the same Kodi version everywhere. 
Is this the same for MariaDB also?

MySQL requires the same Kodi version but does it require the same OS also, e.g are LibreELEC and OSMC compatible?

Thanks!
Reply
(2019-03-21, 00:21)mataus19 Wrote: Is this the same for MariaDB also?
Sorry, I was referring to Kodi's different database schema versions. Not so much the differences between MySQL/MariaDB SERVER versions.
Reply
For those interested in MySQL 8, I just tried to do a clean install and Kodi couldn't create the database completely with some error of Trigger creation; I have a feeling it has to do with the DELIMITER.
The workaround was to spin up an instance of MySQL 5 and have Kodi create the databases, tables, views, and triggers on that one, and then move the databases (both structure and data) from MySQL 5 to MySQL 8, either using mysqldump or any MySQL client you might have. If you do this, make sure the user account Kodi uses to log into the databases is exactly the same on both; the username and the hostname in the databases must match or else the views being created will not be consumable by Kodi.

For those asking about running MySQL or MariaDB on a NAS: depending on how big your data gets, the extremely limited amount of RAM on the NAS will limit the speed at which Kodi will be able to get data from it. With large databases, Kodi is pretty much already handicapped by having to transfers hundreds of MB over your network and being low on memory forces your MySQL to provide the data even slower. Depending on how perceptive you are of the slowness, having 4GB of RAM on your NAS and letting MySQL use 3 of it might be good enough. Additionally, keep in mind that the database writing to disk will wear out the HDD and that is probably something you want to avoid.

For those asking about different versions of Kodi and the database: each version of Kodi looks for a database with a specific name; it doesn't care what OS they are running on or what flavor or version of MySQL they are on. For example, Kodi v18 looks for a database named <prefix>116 for the video library; the prefix is whatever you defined as name in your advancedsettings.xml file. You can have MySQL 5 running on Windows at your home and MySQL 8 running on a Linux server on your yacht and setup some form of replication between them (if that is even possible); as long as both have a database named <prefix>116, your Kodi v18 setups will show the same data at home and on your yacht.
Reply
On Windows 10, Leia, MySql 5.5. I have seen it mentioned that after 5.7, the password will expire automatically after a year, I wonder if this is the same for 5.5, and if so, I have not really found a good description of how to make it permanent (if needed). (The link from the wiki page throws a 404 error).
Reply
(2019-04-15, 05:15)clones Wrote: On Windows 10, Leia, MySql 5.5. I have seen it mentioned that after 5.7, the password will expire automatically after a year, I wonder if this is the same for 5.5, and if so, I have not really found a good description of how to make it permanent (if needed). (The link from the wiki page throws a 404 error).

I am using mysql-5.5.30-winx64 and its been installed few years, most likely around 3 years i think. No password has expired on this version for me.
Reply
(2019-04-15, 05:15)clones Wrote: On Windows 10, Leia, MySql 5.5. I have seen it mentioned that after 5.7, the password will expire automatically after a year, I wonder if this is the same for 5.5
I've been running MySQL 5.5 on Linux for 4.5 years now, and not ever did I have to change the password. Perhaps on Windows MySQL has some extra admin tools active, but still, it's the 1st time I hear of this for MySQL.

(2019-04-15, 05:15)clones Wrote: The link from the wiki page throws a 404 error)
Which exact wiki page is that?
Reply
(2019-04-15, 10:46)Klojum Wrote:
(2019-04-15, 05:15)clones Wrote: On Windows 10, Leia, MySql 5.5. I have seen it mentioned that after 5.7, the password will expire automatically after a year, I wonder if this is the same for 5.5
I've been running MySQL 5.5 on Linux for 4.5 years now, and not ever did I have to change the password. Perhaps on Windows MySQL has some extra admin tools active, but still, it's the 1st time I hear of this for MySQL.
(2019-04-15, 05:15)clones Wrote: The link from the wiki page throws a 404 error)
Which exact wiki page is that?   
That's good to hear, and thank you both for your responses 

From the https://kodi.wiki/view/MySQL/Setting_up_MySQL, Some versions of MySQL set their passwords to expire by default, even the root password! If the password expires, Kodi cannot access the database and the TV Series and Movies libraries will disappear.
To avoid this and/or fix it after it happens, make sure the account's password does not expire. (See: https://dev.mysql.com/doc/refman/5.7/en/...olicy.html  (Throws the 404 error)
Reply
(2019-04-15, 14:05)clones Wrote: That's good to hear, and thank you. 
I've updated the wiki page with a different/similar mysql documentation webpage, that should do it for now.
Reply
I want to use this method to share a library across two boxes, but I have a few questions about what I read on the wiki.

The instructions say to make the files accessible over the network. I already shared them with UPnP before I learned that it didn't really sync them up between devices like I thought. It is more like navigating a folder structure. I wanted both boxes look identical (I know skin settings are separate) in that the Movies item goes straight to the list and the widgets shows recently added, etc.

Anyway, they are shared with UPnP, but the wiki says that even the box running MySQL needs to access them over the network (for advancedsettings.xml). Currently the library exists on an external HD locally connected to box 1. I'm worried if I remove that source and re-add it using the UPnP share of itself (assuming I have that right) it will essentially zero out all my library stuff as far as watched, resume times, etc. Will I lose all that stuff or am I missing something?

I also just wanted to make sure I have this right and that the end product will mean that both the boxes see the library "natively" for lack of a better term. I don't want to have to navigate through Videos, Titles, etc and not have the background art and all that stuff I love about it looks on box 1.

Last question for now. Box 1 is a pi3. Box 2 is a Vero 4k. Should I run MySQL on one box over the other? I know the Vero is generally more powerful, but I'm not sure how much juice MySQL really takes or if the effect will be negligible.

Thanks!
Reply
Hi guys,

so with help from this very page just over a year ago, i managed to get two kodi's synced up to one another, a MiniPC running the MySQL server as a main one, and a RPi as a secondary. such a great tool and i have really gotten used to having them synced up!

However, following my Pi updating to a newer Kodi i decided to so some spring cleaning on both devices and reset both the Windows MiniPC and the Pi, and all has broken. I have clean isntalls of everything.

Initially, trying MySQL 5.5, i was never able to log back into MySQL after the initial setup, it would let me log into the command line initially, but then as soon as i began to work on it, i would get 'Error 2003' whenever i put my password in. I went with MySQL 8.0 instead and whilst that error is no longer happening, others are.

I can create everything i need to in MySQL 8.0, and access the required media folders through the network on both devices, however i cannot scan the library. 

Looking at my kodi log, it seems to alternate between 'Host ‘XXX.XXX.X.XX’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’ (i then flush and/or restart MySQL service), and the other error 'Plugin caching_sha2_password could not be loaded: The specified module could not be found. Library path is 'lib/mariadb/plugin/caching_sha2_plugin.dll'

Has anybody experienced these issues before?

Thanks in advance.
Reply
(2019-07-08, 20:12)garynitely Wrote: Hi guys,

so with help from this very page just over a year ago, i managed to get two kodi's synced up to one another, a MiniPC running the MySQL server as a main one, and a RPi as a secondary. such a great tool and i have really gotten used to having them synced up!

However, following my Pi updating to a newer Kodi i decided to so some spring cleaning on both devices and reset both the Windows MiniPC and the Pi, and all has broken. I have clean isntalls of everything.

Initially, trying MySQL 5.5, i was never able to log back into MySQL after the initial setup, it would let me log into the command line initially, but then as soon as i began to work on it, i would get 'Error 2003' whenever i put my password in. I went with MySQL 8.0 instead and whilst that error is no longer happening, others are.

I can create everything i need to in MySQL 8.0, and access the required media folders through the network on both devices, however i cannot scan the library. 

Looking at my kodi log, it seems to alternate between 'Host ‘XXX.XXX.X.XX’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’ (i then flush and/or restart MySQL service), and the other error 'Plugin caching_sha2_password could not be loaded: The specified module could not be found. Library path is 'lib/mariadb/plugin/caching_sha2_plugin.dll'

Has anybody experienced these issues before?

Thanks in advance.

I don't know how much help this is but I am using MySql V5.6.43 and don't see any issues with Kodi 18.3 nightlies. Syncing 3 Mini Zotacs and and Android Tablet. MySql runs off an old Dell XT3 I installed a SSD in.
Reply
Hi.
I don't know why, but since I installed Kodi 18.4 the series no longer works.
I see the series but Kodi doesn't let me into the episodes. It's definitely due to the DB because when I use Kodi default (local) everything is fine.

My advancedsettings:
<advancedsettings>
    <videodatabase>
      <type>mysql</type>
      <host>192.168.2.110</host>
      <name>kodi_video</name>
      <user>kodi</user>
      <pass>kodi</pass>
    </videodatabase>

<musicdatabase>
 <type>mysql</type>
  <host>192.168.2.110</host>
  <name>kodi_music</name>
      <user>kodi</user>
      <pass>kodi</pass>
</musicdatabase>

    <pathsubstitution>
    <substitute>
      <from>special://masterprofile/Thumbnails/</from>
      <to>smb://192.168.2.110/KODI/Thumbnails/</to>
    </substitute>
    </pathsubstitution>
</advancedsettings>


I tried deleting (drop) and rebuilding the DB on my nas but nothing.
The movie work fine!
Reply
(2019-10-22, 16:22)Radicale Wrote: Hi.
I don't know why, but since I installed Kodi 18.4 the series no longer works.
I see the series but Kodi doesn't let me into the episodes. It's definitely due to the DB because when I use Kodi default (local) everything is fine.

My advancedsettings:
<advancedsettings>
    <videodatabase>
      <type>mysql</type>
      <host>192.168.2.110</host>
      <name>kodi_video</name>
      <user>kodi</user>
      <pass>kodi</pass>
    </videodatabase>

<musicdatabase>
 <type>mysql</type>
  <host>192.168.2.110</host>
  <name>kodi_music</name>
      <user>kodi</user>
      <pass>kodi</pass>
</musicdatabase>

    <pathsubstitution>
    <substitute>
      <from>special://masterprofile/Thumbnails/</from>
      <to>smb://192.168.2.110/KODI/Thumbnails/</to>
    </substitute>
    </pathsubstitution>
</advancedsettings>


I tried deleting (drop) and rebuilding the DB on my nas but nothing.
The movie work fine!

Hello.
I use mysql with a NAS (DS418) with NFS ethernet gigabit.
I had problems in the beginning to setup everything and understand.


Check this:

https://kodi.wiki/view/MySQL/Setting_up_...ttings.xml

In your advancedsettings.xml it misses this: 
<port>3306</port>

My problem was in the mariadb port, i had to change port to 3307

Now is working very well
Reply
  • 1
  • 35
  • 36
  • 37(current)
  • 38
  • 39
  • 41

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