HOW-TO:Share libraries using MySQL: Wiki Edition
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


Messages In This Thread
RE: HOW-TO:Share libraries using MySQL: Wiki Edition - by AMoo-Miki - 2019-04-14, 04:17
Logout Mark Read Team Forum Stats Members Help
HOW-TO:Share libraries using MySQL: Wiki Edition2