Kodi Community Forum

Full Version: HOW-TO:Share libraries using MySQL: Wiki Edition
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Oh, that sounds interesting. Actually my room mate is relocating or renaming folders once in a while.
What do i need to do to accomplish what you have?

Our setup is like this:
One server with a massive amount of files which are shared through FTP.
Until now what we have is every user has its own local library. If something changes on the server every user has to update and redo scapping.
And i connect through dnydns from another place.

You speak of library and database. Is there a difference? Is all the necessary stuff on the server or are there parts local on the users machines?

I understand the library as a file or MySQL database where for ervery movie or serial all the plots and covers are saved and the marked as watched feature.

It'd be great if it was possible to have all this stuff on a central server so that when i switch to another machine i can still 'log in' and have all my marked as watched movies.
My technical jargon is somewhat lacking. LOL. When I say library, I mean the actual movie files itself. The files you downloaded or copied from DVD. When I say database, I mean just a list of what those files are, what's in the library. Like a menu at a restaurant.

My library, or movie files, is all stored on my machine in the living room. I set up nfs share on it. I did the setup that is explained here for the living room and my bedroom, they share the same database, or list. For my son's bedroom, just added that nfs source on his machine, which gives him his own separate database, or list.

Go to your videos tab, then files>add videos>browse>network filesystem(nfs)> then where ever your files are.

The auto update addon is in the XBMC.org repo
After re-reading your last post, it sounds like you basically have the same setup, we are just using different terms. If you change the folders or move them, you're going to have to update, no way around it. Tell your roomie to stop messing with stuff! LOL. The auto update addon will do it for you at whatever times you tell it to, but then you going to have broken links, going to the old file location, in you database from where he changed things.
(2013-12-19, 00:25)Ned Scott Wrote: [ -> ]
(2013-12-18, 17:52)john_austin Wrote: [ -> ]Ned, thanks. I think the revised step 4 is more clear now. You may want to consider adding "Restart XBMC" after step 3 (adding advancedsettings.xml). Also, that the previous sources/library will be empty, thus requiring you to do the 'add' or "set content".

One thing I'm not clear about is the interaction between the SQL DB and the local (ATV) XBMC library. When new content is added to the NAS and 'update library' is executed on one ATV install of XBMC, the SQL DB must be updated since it is visible to all ATV instances of XBMC. But is the data also stored (and updated) in a local library on each ATV? Can I delete the local DB's on each ATV?

The local library is completely ignored when MySQL is being used. Each XBMC install directly accesses the MySQL server for all information.

So I can delete MyVideos60 and MyVideos75 from each ATV?
If you wanted to, yes.
Ok - thanks! It's up and running now.
Hi All, Ive been trying to get my system to sync and I am lost, forgive me because I am totally new to XBMC and MySql. I currently have 2 XBMC units and one WHS2011 Server that holds all the media. I installed MySql database on Server. I followed the steps to export the database from the lvg room XBMC and create the advancedsettings.xml file. On the living room I dont have the Library pointing to any files and the library is populated and updated with both movies and tv shows as well as the master bedroom XBMC. but the two units dont seem to sync. I dont know how its seeing the library, i am assuming either because of the advancedsettings file or the fact that i imported the library.

I dont even know where to begin troubleshooting, ive started a show on the lvg room xbmc and on the bedroom one it doesnt give me an option to resume play? Any help would be most greatly appreciated!
On nightlies, xbmc doesn't start when using a MySQL database. XBMC logo shows, it crashes, it loops. Debug logging is inconclusive (to me)

09:34:16 T:140645122156352 DEBUG: Loading: libcurl.so.4
09:34:16 T:140645122156352 NOTICE: Running database version Addons15
09:34:16 T:140645122156352 DEBUG: Initialize, updating databases...
09:34:16 T:140645122156352 NOTICE: Running database version ViewModes6
09:34:16 T:140645122156352 NOTICE: Running database version Textures13
09:34:16 T:140645122156352 NOTICE: Running database version MyMusic37
09:34:16 T:140645122156352 ERROR: SQL: The table does not exist
Query: SELECT idVersion FROM version

After deleting my advanced settings, xbmc starts fine. At first, I thought it was OpenElec, but my Android xbmc shows the same behavior. What to do?

edit: Database changed and the conversion was unsuccessful, leading to a corrupt database. Fixed.
Having a nightmare!
Trying to migrate to mysql ..
I have existing library on local machine (PC); mysql is on Ubuntu server (and runs just fine!)
followed the Wiki and all this thread, but the database is not getting any tables created.
first run , got "Host is blocked because of many connection errors"
re-started mysql with mysqld_safe --max_connect_errors=10000 &
no more errors, but no tables created.
what do I have to do to populate the database??

I have a question for MYSQL database and XBMC.

I have 3 XBMC in use. 2x Windows7 (Office and HTPC) and once raspbmc.
Thus, the Raspi and the HTPC does not have to update the database, I built according to instructions, the MySQL database version.

Unfortunately, put all 3 clients in the MySQL databases (MyVideo75 - MyVideo76 etc).
Is this intentional or have I made ​​a mistake?

Actually should but can go directly to the sources and database access the Raspi after reinstalling and AdvancedSettings.XML?
But he does this only after the contents of the sources are defined and a database is started scan (actually, he then applies a new and does not access the existing to).

'm Currently at a loss.

Thanks Gallux

(PS: Sorry for Use Englich -> Google translator)
incredible ....
Since you are looking for days ... and found no info.
And then do you make a cry for help and finds the page here that explains everything.
sorted my issues..
you HAVE to
GRANT ALL ON *.* TO 'xbmc';

it does not work if you
GRANT ALL ON `MyMusic%`.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';
GRANT ALL ON `MyVideos%`.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';

this is not a secure situation - I use mysql on my main server, so am not about to grant xbmc unfettered access to all of mysql

and .. having installed the library, every subdirectory of my media now had loads of files - an nfo file and another 2 jpg files - not impressed.
also, you still have to re-create the library on each machine - not what I expected.

All-in-all a lot of a let down.
XBMC needs full access in order to create the databases, once they are created then you can remove full access and just grant access to the databases. If the databse version gets updated in the future you will have to temporarily grant full access in order for the version update to work.

Not sure what you are talking about with media in your library unless you chose to export your library as individual files if you did then media .nfo and art being stored in your library is the intended result.

If set up correctly then there is no need to recreate the library on each machine as it i stored and read from MySql, artwork will be cached in the local Thumbnails directory for improved performance
Thanks for the reply.
I followed the Wiki - which says you *can* limit the GRANT - but you can't initially.

Also, followed the Wiki which says to export ALL data - this put 2000 subdirectories onto my server and 2000 .nfo files

If you could point the way??

I have;
an Ubuntu server, with all my videos (more than 2000) - with mysql running.
loads of devices, which can link to the server & play videos - most don't need transcoding from the server (but some do).

Want - a central database, that can be accessed by all devices.

The Wiki is not completely helpful.
Would it be better to have a blank install of xbmc, set up mysql and then allow the blank install to fill the database?
You could have exported the database as a single file which would not have "polluted" your library. I like the media stored in my library. You also could have rescraped the library from a blank install.

The wiki is aimed at someone with no knowledge of MySql an experienced user should be able to figure out the need to create databases, it's free to edit if you want to improve it.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40