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)



- albaranov - 2010-09-06

Mitch23 Wrote:@albaranov

Thanks. After the modifications the same query takes only 1 second.

Mitch23

Great! Good luck with 100,000 files. Alex


- charrua - 2010-09-06

albaranov Wrote:Hi Charrua,
I've completed testing the music database with several amendments.
There were three issues:
1. Delay of 3 minutes when you click on an Artist in Library mode.
Fixed by adding index as per http://forum.xbmc.org/showthread.php?tid=78425
2. Delay of 20 seconds when you click on "Artists"
Fixed by: alter table song add index idArtist(idArtist);
3. Delay of 10 seconds when you click on "Genres"
Fixed by: alter table song add index idGenre(idGenre);
Now, in my case, everything opens momentarily on the main machine. Alex
Very good tips! Thanks.


- Talguy - 2010-09-10

So I am about to build my first XBMC HTPC and would like to go with a centrailized DB and have lite frontend clients. My question is when I add new content to XBMC i.e. a movie how does it get added to the mysql database. Also how would I be able to add the scraped data for that file to the database.


- pregi - 2010-09-12

hi
is there an Option to set timeout for MySQL DB?
sometimes my MySQL Server is down, because of this xbmc hangs and is nearly unusable


Unable to open database: xbmc_video (0) - dora - 2010-09-18

I'm trying to use the MySql external db feature but unfortunately, I can't make it work.
I'm using MySql server 5.5 and XBMC Dharma beta 2, both running on the same machine (Windows 7).
Looking in XBMC logfile, I can see the following error:
Code:
22:22:19 T:3268 M:1636188160  NOTICE: Loaded advancedsettings.xml from special://profile/advancedsettings.xml
22:22:19 T:3268 M:1636184064  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>localhost</host>
                                                <port>3306</port>
                                                <name>xbmc_video</name>
                                                <user>xbmc</user>
                                                <pass>xbmc</pass>
                                              </videodatabase>
                                              <musicdatabase>
                                                <type>mysql</type>
                                                <host>localhost</host>
                                                <port>3306</port>
                                                <name>xbmc_music</name>
                                                <user>xbmc</user>
                                                <pass>xbmc</pass>
                                              </musicdatabase>
                                            </advancedsettings>
22:22:19 T:3268 M:1636167680 WARNING: VIDEO database configuration is experimental.
22:22:19 T:3268 M:1636167680  NOTICE: Getting hardware information now...
22:22:19 T:3268 M:1636167680  NOTICE: Checking resolution 12
22:22:19 T:3268 M:1636167680  NOTICE: Default DVD Player: dvdplayer
22:22:19 T:3268 M:1636167680  NOTICE: Default Video Player: dvdplayer
22:22:19 T:3268 M:1636167680  NOTICE: Default Audio Player: paplayer
22:22:19 T:3268 M:1636265984  NOTICE: Loading media sources from special://masterprofile/sources.xml
22:22:20 T:3268 M:1621999616  NOTICE: initializing playlistplayer
22:22:20 T:3268 M:1621999616  NOTICE: DONE initializing playlistplayer
22:22:20 T:3268 M:1611956224   ERROR: Unable to open database: xbmc_video (0)
22:22:20 T:3268 M:1611952128   ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
22:22:20 T:3268 M:1611857920   ERROR: Unable to open database: xbmc_video (0)
22:22:20 T:3268 M:1611849728   ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
22:22:20 T:3268 M:1611841536   ERROR: Unable to open database: xbmc_video (0)
22:22:20 T:3268 M:1611841536   ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
22:22:20 T:3268 M:1611841536   ERROR: Unable to open database: xbmc_video (0)
22:22:20 T:3268 M:1611841536   ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
22:22:20 T:3268 M:1610698752  NOTICE: initialize done
22:22:20 T:3268 M:1610686464  NOTICE: Running the application...
22:22:20 T:3268 M:1610665984  NOTICE: ES: Starting event server
22:22:20 T:5732 M:1610633216  NOTICE: ES: Starting UDP Event server on 127.0.0.1:9777
22:22:20 T:5732 M:1610563584  NOTICE: UDP: Listening on port 9777
22:22:21 T:3268 M:1604685824   ERROR: Unable to open database: xbmc_video (0)
22:22:21 T:3268 M:1604677632   ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
22:22:21 T:3268 M:1601159168   ERROR: Unable to open database: xbmc_video (0)
22:22:21 T:3268 M:1601695744   ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
22:22:21 T:3268 M:1607045120   ERROR: Unable to open database: xbmc_video (0)
22:22:21 T:3268 M:1607581696   ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
and my advancedsettings goes like that:
Code:
<videodatabase>
    <type>mysql</type>
    <host>localhost</host>
    <port>3306</port>
    <name>xbmc_video</name>
    <user>xbmc</user>
    <pass>xbmc</pass>
  </videodatabase>
I already added xbmc user with full permision granted plus DBDesigner.
I also tried to use latin1 as server character set and collation.
Any help?
Thanks
Dora


- Soul - 2010-09-18

Have you actually created the databases, and not just the user?

Just checking - you might be expecting XBMC to create the dbs on first run or something. Smile


- dora - 2010-09-18

Soul Wrote:Just checking - you might be expecting XBMC to create the dbs on first run or something. Smile

Actually, I did expected XBMC to create the dbs on the first run, shouldn't I?
If I do need to create them by myself, can you give me a hint how to do it?
I already spent more than 5 hours to make it work before I decided to ask for help.
:confused2:

Dora.


- craigd - 2010-09-19

Soul Wrote:Have you actually created the databases, and not just the user?

Just checking - you might be expecting XBMC to create the dbs on first run or something. Smile

xbmc does create the databases on first run.

it looks like you've had the db created with an old xbmc build and the database has changed. try dropping the schemas from your sql server and restart xbmc


- dora - 2010-09-19

craigd Wrote:it looks like you've had the db created with an old xbmc build and the database has changed. try dropping the schemas from your sql server and restart xbmc
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.


- avus m3 - 2010-09-20

I have a quick question about using the centralized DB setup. I have it working on my machines being able to resume paused play in another room etc. One problem I have is I added a few episodes of different shows and it's not adding them?? I selected to update library (have it update on startup as well) but it doesn't add the show episodes. Everything works besides not able to add episodes. Any ideas?


- sladinki007 - 2010-09-20

* sladinki007 grumbles

seems that the beta screwed up my mysql library
not that the upgrade broke something or so
just after a rescan of all my inventory
i can't seem to make the library mode work

i see all the info but when i click on a movie to play then it can enter the folder

weird .....

i moved my mysql to a linux box ubuntu server x64 10.4.1 since it is much faster then running mysql on a w7 x64 machine

could it be some permission issue? most of the movies are on windows boxes...

nothing usefull in the logs
and if i put the mysql off and run the sqlite db then everything works as usual

bit lost here to what the issue can be

was hoping somehow it was a known issue but seems it is my setup Sad


UPDATE
mmm i thought about the latin1 option when i setup the new database but the collate thingie i forgot
so after dropping DB and setting new DB with the commandline a bit back in this thread is all well again

I wish the developpers could look into it to have more standard settings allowed in mysql and to have the backslash thingie resolved in mysql
but guess they are focussing now to bring a stable release


- rottenrocky - 2010-09-20

avus m3 Wrote:I have a quick question about using the centralized DB setup. I have it working on my machines being able to resume paused play in another room etc. One problem I have is I added a few episodes of different shows and it's not adding them?? I selected to update library (have it update on startup as well) but it doesn't add the show episodes. Everything works besides not able to add episodes. Any ideas?

I was having this problem with my setup as well. I looked at the xbmc.log and found there was a scrape error because the tvshow.xml was missing the episode guide information. After some research I found that if you use Ember Media Manager, you need to set it up with XBMC's API key to get it to properly generate the tvshow.xml, so new episodes will scrape.

If you don't use Ember, or tvshow.xml files, check your xbmc.log for scrape errors. It could be that the file name can't be resolved by whatever scraper you are using.

RR


- superflip - 2010-09-20

can you tell me more about that backslash issue (I couldn't find anything about that).
This could be a hint to my problem. Everytime I tried to insert a movie into my MySQL database I get the following error message in my log:
23:24:58 T:2364 M:4294967295 ERROR: CVideoDatabase::GetNavCommon failed
23:24:58 T:2364 M:4294967295 ERROR: XFILE::CDirectory::GetDirectory - Error getting videodb://1/1/


- myrison - 2010-09-21

videodb://1/1/ means the MovieGenre's page of your library. Just a wild guess, but it looks like maybe the tables in your database are screwed up... have you tried removing the entire db and starting over to let XBMC recreate all of the default tables?


- superflip - 2010-09-21

I've just installed the new database - so this is a fresh database generated by the same XBMC instance. I took the guide from: Lifehacker.com to set it up.
The only difference is, that MySQL database was already installed for MP TV server on this machine, but I cannot imagine how this might be a difference (especially when I set up permissions properly)