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

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Windows support (/forumdisplay.php?fid=59)
+---- Thread: 2 XBMC PCs and 1 Database on the shared NAS (/showthread.php?tid=70603)



- myrison - 2010-09-30 22:10

Dora, I suspect, but don't know for certain, that if you just share the userdata folder you might run into file contention issues if two or more people are using it at the same time. MySQL has logic built in to deal with this as it happens, but I'm not sure what happens if you just share the same root folders. With that said, if it works for you as is, I guess run with it until you find a reason to change.


- mwkurt - 2010-09-30 22:13

Dora,

Thank you so much for your help!!!

The double slash "\\" did the trick!

I am sorry that I can't help you with why using mysql may be better than using links. Maybe it's not. It looks to be just as good. Someone with more experience than myself will have to chime in on this.

Thanks again,
Mark


Problem with duplicate paths - coolnicks - 2010-09-30 23:04

Hi All,

Just trying to get XBMC working with MySQL, but not having much luck, DBs are setup with correct character sets and collations, XBMC can talk to the DB fine. However, when I try to scan my TV shows, it dosent work very well at all, it only finds the first eppisode for some shows, and trys to insert lots of duplicate paths (path.strPath has a unique index).

When the scan has finshed, if I look in the files table there is only the first eppisode from a few shows.

Here is the log of it trying to insert multiples of the same path:

Code:
21:50:07 T:2964 M:1379332096  NOTICE: VideoInfoScanner: Starting scan ..
21:50:14 T:2964 M:1390153728   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','','')
21:50:15 T:2964 M:1389404160   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','',''))
21:50:15 T:2964 M:1387954176   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','','')
21:50:15 T:2964 M:1387954176   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','',''))
21:50:17 T:2964 M:1369280512   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','','')
21:50:17 T:2964 M:1369280512   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','',''))
21:50:17 T:2964 M:1368559616   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','','')
21:50:17 T:2964 M:1368559616   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','',''))
21:50:22 T:2964 M:1393586176   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','','')
21:50:22 T:2964 M:1393586176   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','',''))
21:50:22 T:2964 M:1391017984   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','','')
21:50:22 T:2964 M:1391017984   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','',''))

Does it query for the path first, and if not found insert it, is there a reason maybe it isnt finding it first?

EDIT: I think its this bug: http://trac.xbmc.org/ticket/9022

Any ideas?

Nick


- sloth - 2010-09-30 23:40

Hello,
I just tried to set up the mysql central database. I tested the the mysql-database with a php script and it exists, and is accessable with the username and password I set. However, when I start XBMC it cannot connect to it ("unable to open database xbmc_video"). This is my advancedsettings.xml file:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.8</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>
</advancedsettings>
The database was created as suggested (CREATE DATABASE xbmc_video CHARACTER SET latin1 COLLATE latin1_general_ciWink.
Any ideas, what I am doing wrongly?

Best wishes,
Jonas


- myrison - 2010-10-01 03:37

did you try it with your firewalls totally off? Do at least that much to rule out that a firewall on either machine isn't contributing to the problem.


XBMC Thumbnails located on NAS? - flamez - 2010-10-01 04:05

I have xbmc storing my video database in mysql fine now! YEAH! but i would like to get my thumbnails stored there as well.

i am running xbmc dharma beta 2 live installed on HD on my Revo and i have my unRaid server storing my mysql video database on.

I have tried many ways to get this working and no luck so far!

I understand that i need to store them in a folder on my nas and not in mysql.

Any ideas to help me get this working?

Thanks for any help!

Flamez


- sloth - 2010-10-01 09:11

myrison Wrote:did you try it with your firewalls totally off? Do at least that much to rule out that a firewall on either machine isn't contributing to the problem.

Yes, the firewall is off. I am using XBMC Dharma beta 2 on OSX 10.6 and Windows 7. All media and the mysq 5.1.41 database are on a Ubuntu Server 9.04.


- alex84 - 2010-10-01 09:56

flamez Wrote:I have xbmc storing my video database in mysql fine now! YEAH! but i would like to get my thumbnails stored there as well.

i am running xbmc dharma beta 2 live installed on HD on my Revo and i have my unRaid server storing my mysql video database on.

I have tried many ways to get this working and no luck so far!

I understand that i need to store them in a folder on my nas and not in mysql.

Any ideas to help me get this working?

Thanks for any help!

Flamez

Check this out, question has been solved before mate...
http://forum.xbmc.org/showpost.php?p=605915&postcount=2

Cheers


- smiffy1989 - 2010-10-01 13:08

coolnicks Wrote:Hi All,

Just trying to get XBMC working with MySQL, but not having much luck, DBs are setup with correct character sets and collations, XBMC can talk to the DB fine. However, when I try to scan my TV shows, it dosent work very well at all, it only finds the first eppisode for some shows, and trys to insert lots of duplicate paths (path.strPath has a unique index).

When the scan has finshed, if I look in the files table there is only the first eppisode from a few shows.

Here is the log of it trying to insert multiples of the same path:

Code:
21:50:07 T:2964 M:1379332096  NOTICE: VideoInfoScanner: Starting scan ..
21:50:14 T:2964 M:1390153728   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','','')
21:50:15 T:2964 M:1389404160   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','',''))
21:50:15 T:2964 M:1387954176   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','','')
21:50:15 T:2964 M:1387954176   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\24\\','',''))
21:50:17 T:2964 M:1369280512   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','','')
21:50:17 T:2964 M:1369280512   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','',''))
21:50:17 T:2964 M:1368559616   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','','')
21:50:17 T:2964 M:1368559616   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\American Dad\\','',''))
21:50:22 T:2964 M:1393586176   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','','')
21:50:22 T:2964 M:1393586176   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','',''))
21:50:22 T:2964 M:1391017984   ERROR: SQL: Undefined MySQL error: Code (1062)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','','')
21:50:22 T:2964 M:1391017984   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'O:\\Black Books\\Black Books Series 1\\','',''))

Does it query for the path first, and if not found insert it, is there a reason maybe it isnt finding it first?

EDIT: I think its this bug: http://trac.xbmc.org/ticket/9022

Any ideas?

Nick

I decided to setup syncing this morning but have that exact same problem :/


- flamez - 2010-10-01 17:43

alex84 Wrote:Check this out, question has been solved before mate...
http://forum.xbmc.org/showpost.php?p=605915&postcount=2

Cheers

Are those steps in that post preformed on the NAS box or Live Box?

Thanks