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)



- avus m3 - 2010-11-17

There should be a summary sticky because obviously as threads get longer people don't look through them. Plus, it would make it easier on a lot of users trying to make mysql work for them.

Common troubleshooting fixes that cure *most* problems:

1) Grant proper permissions to xbmc user
2) Make sure character and collation are set to latin1 as mentioned above (defaults for mysql)
3) If you created the db with an older build of xbmc and have troubles, delete it and recreate it.
4) Use a recent build of xbmc. Older builds have issues that have been addressed.
5) Make sure all media is added as a smb link and not direct/mapped
6) Make sure you can hit the server at the designated port number (firewall issues)
7) Make sure you can access the media and proper permissions are set (smb issues)
8) Make sure your server ip is correct in the advancesettings xml
9) I recommend to make a symlink for the thumbnails, advancesettings.xml, and sources.xml to make sure all pc's are consistent

I am sure there are others I forgot. This is off the top of my head. I really think the sticky is a good idea. Have the sticky locked and just updated/edited as needed with relevant info so it doesn't get cluttered. Threads like this are great but hard to go through for people looking for info. What are all your thoughts? Maybe one of the admins can make it happen?


- BDPNA - 2010-11-18

avus m3 Wrote:There should be a summary sticky because obviously as threads get longer people don't look through them. Plus, it would make it easier on a lot of users trying to make mysql work for them.

Common troubleshooting fixes that cure *most* problems:

1) Grant proper permissions to xbmc user
2) Make sure character and collation are set to latin1 as mentioned above (defaults for mysql)
3) If you created the db with an older build of xbmc and have troubles, delete it and recreate it.
4) Use a recent build of xbmc. Older builds have issues that have been addressed.
5) Make sure all media is added as a smb link and not direct/mapped
6) Make sure you can hit the server at the designated port number (firewall issues)
7) Make sure you can access the media and proper permissions are set (smb issues)
8) Make sure your server ip is correct in the advancesettings xml
9) I recommend to make a symlink for the thumbnails, advancesettings.xml, and sources.xml to make sure all pc's are consistent

I am sure there are others I forgot. This is off the top of my head. I really think the sticky is a good idea. Have the sticky locked and just updated/edited as needed with relevant info so it doesn't get cluttered. Threads like this are great but hard to go through for people looking for info. What are all your thoughts? Maybe one of the admins can make it happen?

Great post. Do you think doing any of those things might fix the slowness issues on Ubuntu? I had the slowness issues before I added my thumbnails, it's just the SQL database calls -- And the SQL database lives on my Win7 machine, not on my Ubuntu machine. Still doesn't seem to be a workaround for the slowness of the database calls when accessing the home screen.


- indy5 - 2010-11-18

I am seeking some help with a problem I have with creating a new music database. I already have my video library working properly and wanted to get my music into mysql as well.

I created the database in mysql, like I have before. I have also made sure to set the Character Set and Collation to latin1 and latin1_general_ci.

When entering the music section in xbmc under file mode, I am able to scan the files and it actually seems to build the database. I can watch it grow from within HeidiSQL. However, I am unable to set the content of this source to music, in fact, I dont even see the "set content" option under the context menu.

My source path is configured using the SMB convention, not a drive mapping.

It seems that xbmc has created the data tables, but the view tables are not present. I am running Dharma beta 4 and attached is my log file.

http://pastebin.com/embed_js.php?i=FPHfdxfN


- buges - 2010-11-18

Did you create the DB manually ?

Try dropping that DB & letting xbmc create it instead.


- indy5 - 2010-11-18

buges Wrote:Did you create the DB manually ?

Try dropping that DB & letting xbmc create it instead.

Just tried it again, creates the DB, but no views are created. I get about 17 or 18 tables, but that's all. I still cannot set content on the source.


- craigd - 2010-11-18

you don't set content type for music, it's always music.

Just bring up context menu on the parent folder where all your music is and select scan to library.

Also as Buges said there should be no need to create the db xbmc should create it automatically when it starts if you have the correct permissions in mysql and the music library set in advancedsettings.

If you use music db and have slow downs follow albaranov's post for workaround http://forum.xbmc.org/showpost.php?p=598834&postcount=478, these should also be in faq for troubleshooting if added


- buges - 2010-11-18

I've just looked at my thumbnail folder on my server (symbolic linked from vista & my revo running ubuntu 10.10) & it seems even though i have set up samba to force user & group etc.. I have 2 copies of every thumb! xbmc running vista makes a different thumb to xbmc running ubuntu. eg. vista will make a thumb 0b31d17b.tbn & ubuntu will make 28ad402a.tbn for the same fanart. I checked the file permissions of both created files & they are identical!!

Why is this happening? since they both have the same smb pw's source dir's etc

Update just realized after a bit more testing the 2 thumbs problem only happens in filemode & not if you scan a folder into the db.

im not sure if this problem comes under this topic, if not i'll make a new post.


- craigd - 2010-11-18

the thumbnail issue isn't related to using mysql the names are created using a checksum or something to match the files I'd start a new post for that issue or search to see if anyone else reported.

I've Also started a new mysql thread and will try to get a full guide to setting up and troubleshooting here http://forum.xbmc.org/showthread.php?p=646813&posted=1#post646813


- indy5 - 2010-11-18

craigd Wrote:you don't set content type for music, it's always music.

Just bring up context menu on the parent folder where all your music is and select scan to library.

Also as Buges said there should be no need to create the db xbmc should create it automatically when it starts if you have the correct permissions in mysql and the music library set in advancedsettings.

Could permissions cause only the tables to be created and not the views? This is what I am seeing now. I did scan the entire music source to the library, but no views are created. In confluence, if I try to switch from file to library mode, the radio button for library is greyed out.

Update:
To answer my own question, YES. I wiped out the sql databases and re-created them from XBMC. Since I run mysql on an unraid server, I had to reinstall that package and start from scratch. XBMC created all tables and views just fine for both video and music. Thanks for helping me find the right direction to go in.


- sdaconceicao - 2010-11-29

I wrote up a short tutorial on how to use a Pogoplug as a MySQL server.
http://www.vectorsigmastudios.com/index.php?page=tutorial&id=2


- xopah - 2010-12-05

Im experiencing slow browsing times and it seams like XBMC is not using persistent connections to the DB and that is what's taking so long times. (login times)
Could this be true?

this it true from two different clients (XBMC 10.0-rc1 r35325)

advancedsettings.xml
Code:
<advancedsettings>
<videodatabase>
    <type>mysql</type>
    <host>192.168.10.11</host>
    <port>3306</port>
    <user>xbmc_video</user>
    <pass>jxxxL</pass>
    <name>xbmc_video</name>
</videodatabase>
</advancedsettings>

sources.xml
Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>MOVIES</name>
            <path pathversion="1">smb://192.168.10.19/storage2/MOVIES/</path>
            <path pathversion="1">smb://192.168.10.19/storage3/MOVIES_2/</path>
        </source>
        <source>
            <name>TV_SHOWS</name>
            <path pathversion="1">smb://192.168.10.19/storage2/TV_SHOWS/</path>
            <path pathversion="1">smb://192.168.10.19/storage3/TV_SHOWS_2/</path>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>


Database Settings:
Character set: latin1
Collation: latin1_swedish_ci
SQL preview for CREATE DATABASE:
CREATE DATABASE `xbmc_video` /*!40100 CHARACTER SET latin1 COLLATE latin1_swedish_ci */


Slow MYSQL access - atomfire - 2010-12-05

I had a similar problem with slow access to MYSQL when going into movies/tvshows in my case it only affected 1 of my machines not both. Turns out MYSQL was trying to resolve the hostname of the machine running the query, I have no DNS server in the house therefore the query failed causing the delay. To resolve I added the IP and hostname to c:\windows\system32\drivers\etc\hosts on the machine running MYSQL this resolved the issue for me.


- rossgemuend - 2010-12-12

To elaborate on atomfire's post, one should put the following line in their my.ini file (running mysql from windows file server) within the mysqld section. This fixed my slow navigation while in Ubuntu.

Code:
[mysqld]

skip-name-resolve



- pregi - 2010-12-12

hi
on my music db i have the same artists tagged with different names like artist1 and artist 1 ...
can i set those different names to one idArtist in mysql?


- castortray - 2010-12-17

Hi,

There is new version of MySQL Community Server 5.5.8:
http://dev.mysql.com/downloads/mysql/5.5.html#downloads
Essentials version still 5.1.54
Someone test it ?