Kodi Community Forum
2 XBMC PCs and 1 Database on the shared NAS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: 2 XBMC PCs and 1 Database on the shared NAS (/showthread.php?tid=70603)



- charrua - 2010-10-06

manka Wrote:
22:25:25 T:5424 M:211607552 ERROR: Unable to open database: xbmc_video [2003](Can't connect to MySQL server on '192.168.1.65' (10061))
Access to the database appears to be a major issue here, but i'm not sure where I am going wrong and how to correct it.
Any help would be gratefully received
Manka

Open port 3306 in Win7 firewall.


- charrua - 2010-10-06

Bommy Wrote:Aha! Googling that error message I quote has taken me to...

http://trac.xbmc.org/ticket/9022
http://forum.xbmc.org/showpost.php?p=593315&postcount=438

Now I've added the sources as network paths and things seem to be importing again, although I think I'm about to get saddled with a load of duplicate entries into my database! Sad

Thanks charrua for your work getting this solution worked out, and if you got my PM, sorry I disturbed you!

No problem. Good Googling! Smile
Regarding duplicate entries, you can always use the "Clean library..." feature in the Settings>Video>Library menu to get rid of the unavailable items (the local paths in your case).


- charrua - 2010-10-06

dora Wrote:Maybe I wasn't clear enough. I also waited for a built in method to make many clients access one database.
Actually, I didn't wait for this feature to become available and I tried to achieve it using symbolic links.
Here are the details:
When using sqlite3 method (currently the default method), the db files are stored in userdata\Database folder (MyMusic7.db and MyVideos34.db).
If you want two xbmc clients to share the same db, all you need to do is make these two files point to the same files on the disk. You can achieve that by using symbolic links. It works even accross the network.
Once you do that, the two xbmc clients share the same db. When one of them updates the db, the other can see the change.
You can also share the whole userdata folder (like I did before the MySQL method became available). By doing that, you share also all your settings, not only the db.
Now, when the MySQL method became available, I decided to give it a chance but it looks like it has some problems, like the thumbnails cache and user profiles.
My question is what are the advantages of the MySQL method over sharing sqlite db files using symbolic links.
I still didn't get an answer for this question.

In one word: concurrency
If you need to access the same db from several clients at the same time, MySQL is much better than SQLite. If you will access the db only from one client at a time, then I'm not really shure that the MySQL implementation is a big improvement over SQLite.


- dora - 2010-10-06

charrua Wrote:In one word: concurrency
If you need to access the same db from several clients at the same time, MySQL is much better than SQLite. If you will access the db only from one client at a time, then I'm not really shure that the MySQL implementation is a big improvement over SQLite.

Thanks for your reply. That's what I thought.
I guess the problem is only with updating the db and not with reading it.
Since I'm making the administrative tasks only from one client (and I'm the only one who does it), I don't expect to encounter any problems.
As I wrote, in one of my other posts, using symbolic links to share sqlite db looks like a hack so I'm looking forward for the MySQL method to become stable enough.
I've read that the MySQL implementation is redesigned and rewritten again. Do you have an estimated date when it will be available?


- charrua - 2010-10-06

dora Wrote:I think that I did more than that. I completely unintalled MySql 5.1 and installed MySql 5.5. I thought that the problem might be that I'm not using the last version of MySql but that didn't help.
I don't know anything about schemas, what do you mean by dropping them? how do I do that?
Since I'm using XBMC in portable mode (-p switch), I also tried to delete XBMC\portable_data\userdata folder but that didn't help either.

Dora.

UPDATE:
It looks like you do have to create the databases by yourself.
I followed the instructions on: http://lifehacker.com/5634515/how-to-synchronize-your-xbmc-media-center-across-every-room-in-the-house and the errors on the log disappeared.

Nope, you don't need to create the DBs yourself, XBMC creates them (you can create them if you want, but it's not necessary). You just have to make shure that the correct collation and charset (latin1) are selected at MySQL server level.


- charrua - 2010-10-06

dora Wrote:Thanks for your reply. That's what I thought.
I guess the problem is only with updating the db and not with reading it.
Since I'm making the administrative tasks only from one client (and I'm the only one who does it), I don't expect to encounter any problems.
Yes, I believe that you're correct.

dora Wrote:As I wrote, in one of my other posts, using symbolic links to share sqlite db looks like a hack so I'm looking forward for the MySQL method to become stable enough.
I've read that the MySQL implementation is redesigned and rewritten again. Do you have an estimated date when it will be available?
No, I'm not part of the development team... Just a forum reader. Wink
But I'm also interested in an estimated date of availability for the db redesign...


- CuFk - 2010-10-06

Bommy Wrote:Aha! Googling that error message I quote has taken me to...

http://trac.xbmc.org/ticket/9022
http://forum.xbmc.org/showpost.php?p=593315&postcount=438

Now I've added the sources as network paths and things seem to be importing again, although I think I'm about to get saddled with a load of duplicate entries into my database! Sad

Thanks charrua for your work getting this solution worked out, and if you got my PM, sorry I disturbed you!

How come it does not work with a mounted network drive when keeping the data on a MySQL-server? I guess I should use the "SMB" in windows?


- manka - 2010-10-06

charrua Wrote:Open port 3306 in Win7 firewall.

I appreciate the response, but i've already done this. I think its got something to do with my stora...tried clearing the rules in the iptable at work today and will try it again when i get home, although I don't hold out much hope! Huh

manka Wrote:PC in lounge and bedroom on windows 2007 both with dharma 1 installed. Firewall port open for 3306.Manka



MySQL connection no worky - meyersmp - 2010-10-07

EDIT: Disregard - I'm moving this to it's own thread rather than tacking it onto this long one.

Can't seem to get XBMC to connect to mysql.

Running latest stable xbmc & windows 7 all around

What I did
  • Installed mysql server 5.1
  • created database for music & video
  • created user and Granted All on *.*
  • setup advancedsettings.xml file with proper fields populated
  • restarted xbmc and imported old video library
  • setup advancedsettings.xml on other xbmc installs

but no worky...

Logging into the mysql and showing tables returns "Empty Set"
Looking in the xbmc logs it is seeing the advancedsettings.xml file and parsing it without errors.
Windows firewall is completely off

I downloaded MySQL workbench and tried to connect but I'm not sure I'm doing it right. I'm not familiar with the software I went to the GRT Shell and typed:
mysql -h 192.168.1.213 -u xbmc -p
I was returned luart: error: stdin:1: '=' expected near '-'

Please point out the obvious and make me feel stupid (in a good way). Thanks in advance.


- blacklist - 2010-10-09

meyersmp Wrote:Running latest stable xbmc & windows 7 all around

Use Dharma Beta 2. All will be revealed.


- Bommy - 2010-10-09

I'm a bit confused about how best to use WakeonLan with this.

I have two pcs - HTPC (which hosts the database and all content) and TVPC (which accesses the database but stores no content). I want to set both to hibernate after 30 minutes of no activity, and to always have XBMC running.

Would be really nice to get the TVPC to send a WOL magic packet to the HTPC whenever it wakes up. Is there a neat way to do this, or should I just resign myself to waking the HTPC via my iPhone WOL app every time? I've seen another post where someone edits to home screen to send WOL packets but they say they have to re-update it every time they change skin, etc. Because if TVPC is running and HTPC is not, the menu basically hangs for a few minutes, which isn't very user-friendly.

I suppose what would be really nice would be if XBMC could, if the dB and/or shares were missing, send a magic packet then wait a specified time before trying to re-access them.


- SDelcroix - 2010-10-11

Sorry for this question..

I've install Dhrama beta 2 under Seven x64... but where is the advancedsettings.xml file ?

:-(


- rottenrocky - 2010-10-11

SDelcroix Wrote:Sorry for this question..

I've install Dhrama beta 2 under Seven x64... but where is the advancedsettings.xml file ?

:-(

The file doesn't exist by default. You have to manually create it. Yse the examples earlier in this thread.

-RR


- Targettio - 2010-10-12

Bommy Wrote:I'm a bit confused about how best to use WakeonLan with this.

I have two pcs - HTPC (which hosts the database and all content) and TVPC (which accesses the database but stores no content). I want to set both to hibernate after 30 minutes of no activity, and to always have XBMC running.

Would be really nice to get the TVPC to send a WOL magic packet to the HTPC whenever it wakes up. Is there a neat way to do this, or should I just resign myself to waking the HTPC via my iPhone WOL app every time? I've seen another post where someone edits to home screen to send WOL packets but they say they have to re-update it every time they change skin, etc. Because if TVPC is running and HTPC is not, the menu basically hangs for a few minutes, which isn't very user-friendly.

I suppose what would be really nice would be if XBMC could, if the dB and/or shares were missing, send a magic packet then wait a specified time before trying to re-access them.

I can't help with the technical aspects of what your asking, but there is a script that allows you to send the WOL packet.

So you could just run the script from the home screen of the TVPC. There also maybe a way to automate it, so when the TVPC wakes from hibernating it fires off the packet.


- Doomstone - 2010-10-13

I am having some problems using a mysql server as my db.
I have just moved from linux to windows, where i used to use mysql as the db, because i have a slave mce.
It can connect to the database, create the tables and right date just fine, but i will just not read from the database. So it can of all of it harts content scan music into the database, but my libary will never be enabled as it thinks there are no songs. This gows the same for movies, i just can't get past set content there.

I'm running
Windows Server 2008 with MySQL 5.1.36
I have tryed both Dharma Beta 2 and Dharma Beta 3. same problem with both.
The xbmc log dose not give any error Sad

xbmc log: http://pastebin.com/LzejFDxk

Another log, where i am able to scan music into the lib and load them again, but the videos are still not working.
http://pastebin.com/3CjtbhcM