v17 Sharing the database using MySQL
#1
Now that I have sorted out most of the issues, with only a handful of minor issues outstanding, I'm starting to plan for the installation on production machines. Kodi will be installed on 4 machines initially + the server.

My preferred method is using MySQL. I have read https://kodi.wiki/view/MySQL/Setting_up_MySQL.

A couple of questions though;

1. Is Kodi via MySQL supported or known to work/not work on Windows 2012 R2?

2. The Wiki refers to an antique version of MySQL; 5.5.42 (way back in 2010). I'm running several databases for websites I've written using ColdFusion. These REQUIRE later versions: 5.7.21 is currently installed. The Wiki says there are issues with the later versions past 5.5, but isn't specific about what those issues are. Whilst it is technically possible to run multiple MySQL versions on one machine (Eg using Docker), this is a real can of worms. Is the only solution to set up a second server? That can get expensive hardware and energy wise! Options?

3. All of the work I have done on Kodi has been on a test PC. This PC is soon going to be required for the next Windows 10 release testing in a month or so, hence the accelerated timeline to get Kodi finalized. Anyway, the sources are defined as SMB:// paths to the server where MySQL 5.7.21 is already running and where the content is stored. All of the scenarios the Wiki describes refer to "Local" databases, which this is clearly not. Is there a way to get my database from the test PC to the server where the media is actually stored without having to redo all the work I've accomplished over the last 8 weeks? (sets, playlists, nfos, stubs and so on).

I'm hoping that this statement from the wiki; Even if the media is on the same computer as one of the Kodi instances, you MUST use a network share path. You cannot use a local file path with MySQL. means that the same SMB:// paths on the test PC will just drop straight into the server installation.

4. Everyone here hates clutter, hence exports have been done to a single file, nfos and custom art have been used only where necessary and the artwork is stored in a single location on the C:\ drive of the Kodi PC. Arguments about the "optimal way to do this" aside, do I need to replicate that artwork to each PC, or can I put that on the MqSQL server in a central location and expect that the PCs will find the artwork ? I suspect the former? Comments?

thank you.
Reply
#2
1) Kodi 18 Leia is switching to MariaDB (afaik), I have no idea how compatible 2012 R2 is with that. I myself am still using Ubuntu 14.04 + MySQL 5.5.x.

2) In general, a Wiki is outdated for most of the time, especially regarding an application that is in constant development. The basics however still apply.

3) Exporting from local SQLite databases to shared MySQL/MariaDB databases.. I have yet to try that myself. Starting with MySQL right from the start is recommend.

4) I personally see separate .nfo files not as clutter. The single file export has had its problems/bugs/etcetera. Also, the separate .nfo files can be delete pretty easily with the correct command line command.
As far as artwork goes, each Kodi client has its own Thumbnail cache as well as fixed local database to track & trace all fanart. This has been a 'company decision' a couple of years ago. Using path substitution has had mixed results.
The MySQL database server can be installed on any suitable machine, as long as your Kodi clients have access to it.
Reply
#3
(2018-04-18, 16:12)Klojum Wrote: 1) Kodi 18 Leia is switching to MariaDB (afaik), I have no idea how compatible 2012 R2 is with that. I myself am still using Ubuntu 14.04 + MySQL 5.5.x.

2) In general, a Wiki is outdated for most of the time, especially regarding an application that is in constant development. The basics however still apply.

3) Exporting from local SQLite databases to shared MySQL/MariaDB databases.. I have yet to try that myself. Starting with MySQL right from the start is recommend.

4) I personally see separate .nfo files not as clutter. The single file export has had its problems/bugs/etcetera. Also, the separate .nfo files can be delete pretty easily with the correct command line command.
As far as artwork goes, each Kodi client has its own Thumbnail cache as well as fixed local database to track & trace all fanart. This has been a 'company decision' a couple of years ago. Using path substitution has had mixed results.
The MySQL database server can be installed on any suitable machine, as long as your Kodi clients have access to it.
 1. A quick search about MariaDB wasn't really helpful. It's quite poorly documented. But seeing as how it seems to be a MySQL fork, I guess the inference is that it will work. However, the complexities with running MariaDB and MySQL are the same as running multiple instances of MySQL; and the instructions actually refer you back to the MySQL documentation. As I said, can of worms.

2. Great Sad Good to know I can rely on the wiki. But what do you mean about basics? That the statement about versions later than 5.5 (2010) still have problems? -  or have they been resolved? I'm asking if I can run Kodi against the latest MySQL version?

3. Ok. So has anyone here moved from a Kodi install on one PC to another PC running MySQL without starting from scratch. (I assume your "recommendation was that I should have started with MySQL from scratch, but I didn't). So, again, is it possible to move it from one PC to another into a MySQL server without re-doing the 100's of hours of work I did?

4. Ok, so you're saying there are issues with the single file, and there are no solutions so use the multi-nfo backup; If I want it to work I can forget about the Single file backup. There is no choice.

I don't know what you're referring to in regards to a company decision? Or path substitution?
What I'm asking is do I need to replicate the custom art across each of the machines? Or can I put the artwork in a central location and tell Kodi where it is (Press 'I' on media item. Choose Art, navigate to the artwork....), and the clients will find it, and then cache it.
Reply
#4
(2018-04-18, 15:50)Yanta Wrote: 4. Everyone here hates clutter, hence exports have been done to a single file, nfos and custom art have been used only where necessary and the artwork is stored in a single location on the C:\ drive of the Kodi PC. Arguments about the "optimal way to do this" aside, do I need to replicate that artwork to each PC, or can I put that on the MqSQL server in a central location and expect that the PCs will find the artwork ? I suspect the former? Comments?
The single file export will only work in a static library, ie nothing changes.

If you have changed the path or filename, the single file export won't work. Sure it will import the library, but it won't be able to locate the file and play the movie. You will end up with a dead library.

If you intend to re-arrange your library, or create libraries on other installations where the paths will most certainly be different, then you need to use export to Separate Files.
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
#5
1) Yes, MariaDB is a fork of MySQL, and it has had a few hickups along the way. Overall, a shared (my)sql database has been working fine with XBMC/Kodi for me for several years now.

2) The Kodi Wiki is pretty extensive in size and details, and the number of people (volunteers) available in updating all that information is, unfortunately, pretty limited. Most people prefer to deal with all the pleasures and not with the pains in maintaining Kodi.

3) As said, exporting Kodi SQLite video and music databases into their MySQL counterparts is hardly ever being done. There are some SQLite-2-MysQL converter tools to be found online, as well as some manual solutions. The fixed local databases of Kodi can easily be copied onto another Kodi client. There is a Kodi Backup addon which can do most of the heavy lifting there.

4) There have been issues with the single file Video Library Export as well as the export of the Music Library. Since I have only used the separate file export mode only, I have no idea on the current status of the single file export. The separate files export method has worked always fine for me.

(2018-04-18, 21:41)Yanta Wrote: There is no choice.
Yes, there is a choice. Simply test out the single file export option, and verify its contents.

(2018-04-18, 21:41)Yanta Wrote: I don't know what you're referring to in regards to a company decision? Or path substitution?
Because it was possible to run Kodi on low-powered weak devices like a Raspberry Pi, because of their poor network performance (lots of people use slow wifi connections), the Kodi developers decided to have Kodi cache all fanart into a local Thumbnails folder on each Kodi client, instead of easily supporting (shared) network storage of the thumbnail cache. So, if you have shared MySQL databases for all video and music metadata, each client will still store the full cache of your video and music collection onto each Kodi client. So yes, I call that a company decision. Not one that I supported, mind you (I wasn't yet part of TeamXBMC at that time, but I already used XBMC/OpenELEC), since I used a Intel PC with plenty of grunt and network speed.

With path substitution you can attempt to store various Kodi stuff on your network storage, but... results have been mixed. Not every addon supports storage via path substitution, and also the caching of thumbnails has had weird hickups. So your mileage will probably vary.
Reply
#6
Ok, I guess the bottom line is that I have to build another PC for Kodi with MariaDB and start from scratch.

Found some posts that say that Win Home Server, and Windows Server are not supported. They can be tweaked to work, but those tweaks will conflict with the several MySQL and Firebird DB's I'm already running (Plus WSUS, Colfusion etc etc).

The unanswered stuff I'll figure out by trial and error.

I priced up a cheap PC (Given that the only option for Coffee Lake is currently Z370), and due to graphics cards and memory prices tripling over the last 18 months I'm looking at $1100 AUD and that's without a graphics card. I need a reasonably new motherboard so I can get an NVMe M.2 slot for the 960 EVO.
Reply
#7
1100 AUD aka 850 USD... sounds still creepy much to me for a simple(?) HTPC machine. I guess it depends on what really is your use case: for example, standard videos upto 1080p, or are you looking for a state-of-the-art 4K/HDR htpc slash gaming rig?

As far as a HTPC goes: try keep things simple because there is never has been a magical ALL-IN-ONE solution. Technology moves fast. Stick to some USD 200,- for a Kodi client for every 2-3 years. There are Intel-based boards like the Asrock J4105 or J5005 which have all the video properties for today's video watching. But something like Netflix may be a problem.

There are solutions for a Raspberry Pi for watching Netflix. You could also use a low-powered Raspberry Pi server and run MySQL from that. (the RPi 3B+ can now boot from USB, thus also booting from an external casing with a SSD inside. I have a Raspbian setup here working that way).

There is also the Nvidia Shield TV as a Kodi client that does quite a lot of good video-wise, but it's basically an Android box.

If you are on the lookout for a new device running Kodi, have a look here.
Reply
#8
Unfortunately the prices here don't go by the exchange rate (at least not directly). it'd be more like $750 USD. We get ripped off a lot here.

Anyway, I've factored in a Z370 board because (a). It has resale value and most importantly (b). It's all that's available for Coffee Lake processors, which are all I can get, until the newer boards are released, if I want to wait 4 - 8 weeks.

This PC will sit in a corner and do nothing but serve content via Kodi/MariaDB.

I've also had to go for a board with HDMI, M.2 and Intel LAN (Killer LAN is all hype). It will plug into a HDMI KVM so I don't have to buy a monitor, keyboard or mouse. All of the cheaper motherboards had display port but no HDMI.

8GB of DDR4-2400 is $135. In September 2016 I could by it for $55.

The I3-8350 is $234 but for $20 extra I can go I5-8400 @ $254.

I found an old case sitting around here - A Phantom 820 with a Corsair H115i cooler, so that takes a couple of hundred off the price.

$160 for the 960 EVO 250gb, $80 for a PSU and we're done.

I won't touch ASRock boards any more. Had 5 fail within 18 months, and ASRock refused to honor the warranties, and I could not force them as they do not have a presence in Australia.

Yes. 4K is a definite! I have 3 x 4K TVs here, 1 x 1080p 3D. One of the 4K TVs also does 3D. My son does have a Netflix account, and NBA League pass.

Considering my PC cost me over $6500 to build, $850 - $900 as it now stands is a minor irritation.

What I'm most peeved about is having to do most of the work I did with Kodi over the last 12 months from scratch (Well, off an on over 12 months. Probably full time for the last 4 weeks).
Reply
#9
By chance, is your media located on a NAS? If so, perhaps the SQL/Mariah DB can be located there. I've been successfully running this scenario on my Readynas for over 5 years with zero issues.

Cheers,
Robert
Reply
#10
Really? You need that horsepower to run a windows server?

I run Intel® Core™2 Duo CPU     E4500  @ 2.20GHz which serves 6 kodi clients, which are mainly cheap chromeboxes.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#11
No, the content is located on a Windows 2012 R2 server with 10 x 10TB NAS drives.

It makes sense to me to load the DB and Kodi there, but as the server is used for multiple applications, and the fact that Kodi is not supported on Windows Server OS's I have to build a separate PC which will act as an intermediary between clients and the content server.

I now have to have 2 PCs instead of one running all the time. Highly inefficient Sad
Reply
#12
(2018-04-19, 21:50)nickr Wrote: Really? You need that horsepower to run a windows server?

I run Intel® Core™2 Duo CPU     E4500  @ 2.20GHz which serves 6 kodi clients, which are mainly cheap chromeboxes.
 The Windows Server - Windows 2012 R2 (Which is NOT the Kodi Server) runs..

WSUS
Coldfusion
MySQL
FireBird DB
8 Websites
A few small Client/Server apps.
Stores the 100 TB of content

Those specs I provided above are not for the Windows Server.

Those specs are for the Kodi server, and as I said, until the new motherboards are in stock I'm stuck with Z370, and since the I5 was only $20 more than the I3....

Where I am the only place I can source old hardware is on eBay, and I don't trust eBay sellers. I also never buy from overseas because (a). Import ransom taxes are astronomical and (b). Warranties are meaningless and unenforceable.

I don't hold onto old hardware either. I sell it to offset the cost of buying new hardware.

I could get Kaby Lake and a Z270 motherboard and save $100 give or take. But with the hardware I've bought I Have resale and redeployment value.

The Kodi clients are the users own PCs which are used mostly for gaming. and two for more "HTPC" oriented tasks, but all of that that hardware is already in existence.

Again, it's not the cost that I'm concerned about. It's having to redo months of work.
Reply
#13
How do you back up your 100tb of data?

Cheers,
Robert
Reply
#14
(2018-04-20, 01:57)WildPhydeaux Wrote: How do you back up your 100tb of data?

Cheers,
Robert
 Macrium reflect.

I have an external USB connected drive too.

I also have a drive stored offsite which contains images of all of the PCs, and critical software/files/licenses etc.

Most of the content comes from retail DVDs/Blurays and is ripped to the server. Don't care if that gets deleted as I can always re-rip it.

Hard drives are always replaced before warranty period expires, regardless of the health state, or replaced if health drops below 20%

But I think we are getting a little off topic.
Reply

Logout Mark Read Team Forum Stats Members Help
Sharing the database using MySQL0