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-03-27

bradvido88 Wrote:OK, so i've got my symlinks set up so they all point to the same thumbnails source. Speed is very comparable, I can't really notice a difference.
It should be noted that I'm hosting all thumbnails on a 2GB SD card formatted as FAT32. I believe this speeds up access times/read as it doesn't have any moving parts Smile. Essentially a cheap Solid State Drive.
I also thought about creating a RAM drive for all the thumbnails to really improve performance, but haven't made that leap yet.
That is more reasonable.


- pkellum - 2010-03-28

charrua Wrote:XBMC does support utf8, but I remember I had a problem involving indexes creation when I was trying to migrate to MySQL, and it was caused by the collation of the database being utf8, I switched to latin1 and the problem was solved.
That did the trick, thanks. I'm still unable to set the content type for sources, but at least all the tables are created now Smile

Appears to never set the path in the database.


- charrua - 2010-03-28

pkellum Wrote:That did the trick, thanks. I'm still unable to set the content type for sources, but at least all the tables are created now Smile

Appears to never set the path in the database.
Check the XBMC log in debug mode to see what's the problem. If you want help post it here as well.


- pkellum - 2010-03-29

charrua Wrote:Check the XBMC log in debug mode to see what's the problem. If you want help post it here as well.

Sorry, I thought I did that last night.

http://pastebin.com/6SU9dSJL


- charrua - 2010-03-29

pkellum Wrote:Sorry, I thought I did that last night.
http://pastebin.com/6SU9dSJL
Reading your log, I think we've just found a bug in the MySQL functionality:
I don't have any local media sources in XBMC database, so I've never hit this error before, but it seems that the SQL for storing/querying local paths has a bug: it's trying to store the paths with "\" instead of "/" and for MySQL "\" is an special character, so it's returning a syntax error when trying to store a local path with that character. Note that network paths don't have that problem, because they are stored in the format "smb://NETWORK_ADDRESS/SHARED_PATH/".
I'll post this error in the developer's thread and see if he can fix it.
In the meantime you can try if you have any problems with networked paths, I guess you won't.

EDIT:
The bug was confirmed by firnsy(the developer of the XBMC MySQL feature) so I raised a bug report (ticket #9022), you can check its status here.


- rtrimarchi - 2010-03-29

Finally I have foud 5 minutes to test the db option.....

...but there is one problem already Oo

I get this errors:

Code:
21:00:34 T:4076 M:2395037696  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>192.168.0.12</host>
                                                <port>3306</port>
                                                <user>xbmc</user>
                                                <pass>xbmc</pass>
                                                <name>xbmc_video</name>
                                              </videodatabase>
                                            </advancedsettings>
21:00:34 T:4076 M:2395029504 WARNING: VIDEO database configuration is experimental.
21:00:34 T:4076 M:2395029504  NOTICE: Getting hardware information now...
21:00:34 T:4076 M:2395029504  NOTICE: Checking resolution 12
21:00:34 T:4076 M:2395029504  NOTICE: Default DVD Player: dvdplayer
21:00:34 T:4076 M:2395029504  NOTICE: Default Video Player: dvdplayer
21:00:34 T:4076 M:2395029504  NOTICE: Default Audio Player: paplayer
21:00:34 T:4076 M:2395029504  NOTICE: Loading media sources from special://masterprofile/sources.xml
21:00:35 T:4076 M:2375454720  NOTICE: initializing playlistplayer
21:00:35 T:4076 M:2375454720  NOTICE: DONE initializing playlistplayer
21:00:35 T:4076 M:2375442432  NOTICE: load default skin:[Confluence]
21:00:35 T:4076 M:2366050304   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366050304   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:35 T:4076 M:2366316544   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366316544   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:35 T:4076 M:2366312448   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366312448   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:35 T:4076 M:2366087168   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366087168   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2360958976  NOTICE: initialize done
21:00:37 T:4076 M:2360958976  NOTICE: Running the application...
21:00:37 T:4076 M:2360938496  NOTICE: ES: Starting event server
21:00:37 T:1380 M:2360930304  NOTICE: ES: Starting UDP Event server on 127.0.0.1:9777
21:00:37 T:1380 M:2360913920  NOTICE: UDP: Listening on port 9777
21:00:37 T:4076 M:2361434112   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:37 T:4076 M:2361430016   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2361380864   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:37 T:4076 M:2361380864   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2361348096   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:37 T:4076 M:2361348096   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2361311232   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))

I have given the user xbmc on the NAS admin rights and LATIN1 is selected

PS: I have not imported yet any db-backup.....

Any idea Huh?


- charrua - 2010-03-29

rtrimarchi Wrote:Finally I have foud 5 minutes to test the db option.....
...but there is one problem already Oo
I get this errors:
Code:
21:00:34 T:4076 M:2395037696  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>192.168.0.12</host>
                                                <port>3306</port>
                                                <user>xbmc</user>
                                                <pass>xbmc</pass>
                                                <name>xbmc_video</name>
                                              </videodatabase>
                                            </advancedsettings>
21:00:34 T:4076 M:2395029504 WARNING: VIDEO database configuration is experimental.
21:00:34 T:4076 M:2395029504  NOTICE: Getting hardware information now...
21:00:34 T:4076 M:2395029504  NOTICE: Checking resolution 12
21:00:34 T:4076 M:2395029504  NOTICE: Default DVD Player: dvdplayer
21:00:34 T:4076 M:2395029504  NOTICE: Default Video Player: dvdplayer
21:00:34 T:4076 M:2395029504  NOTICE: Default Audio Player: paplayer
21:00:34 T:4076 M:2395029504  NOTICE: Loading media sources from special://masterprofile/sources.xml
21:00:35 T:4076 M:2375454720  NOTICE: initializing playlistplayer
21:00:35 T:4076 M:2375454720  NOTICE: DONE initializing playlistplayer
21:00:35 T:4076 M:2375442432  NOTICE: load default skin:[Confluence]
21:00:35 T:4076 M:2366050304   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366050304   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:35 T:4076 M:2366316544   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366316544   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:35 T:4076 M:2366312448   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366312448   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:35 T:4076 M:2366087168   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:35 T:4076 M:2366087168   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2360958976  NOTICE: initialize done
21:00:37 T:4076 M:2360958976  NOTICE: Running the application...
21:00:37 T:4076 M:2360938496  NOTICE: ES: Starting event server
21:00:37 T:1380 M:2360930304  NOTICE: ES: Starting UDP Event server on 127.0.0.1:9777
21:00:37 T:1380 M:2360913920  NOTICE: UDP: Listening on port 9777
21:00:37 T:4076 M:2361434112   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:37 T:4076 M:2361430016   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2361380864   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:37 T:4076 M:2361380864   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2361348096   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
21:00:37 T:4076 M:2361348096   ERROR: Unable to open database at host: 192.168.0.12 db: xbmc_video (old version?)
21:00:37 T:4076 M:2361311232   ERROR: Unable to open database:xbmc_video [1045](Access denied for user 'xbmc'@'192.168.0.10' (using password: YES))
I have given the user xbmc on the NAS admin rights and LATIN1 is selected
PS: I have not imported yet any db-backup.....
Any idea Huh?

Did you try with bradvido88 suggestion?

bradvido88 Wrote:maybe you have the same problem i had, outlined here:
http://forum.xbmc.org/showthread.php?p=507823#post507823

The xbmc user has to have full privileges as well as be a "DBDesigner"

Also make sure you give user xbmc permissions to connect from any ip, and not just from localhost.

Quote:
GRANT ALL PRIVILEGES ON xbmc_video.* TO [EMAIL="xbmc@'%'"]xbmc@'%'[/EMAIL];



- rtrimarchi - 2010-03-29

where do I get that interface Huh

I loaded only the essential that has only the gui to create the istance....

Huh


- charrua - 2010-03-29

rtrimarchi Wrote:where do I get that interface Huh
I loaded only the essential that has only the gui to create the istance....
Huh

Look in the start menu for "MySQL command line client" and run this statement from there:

Quote:
GRANT ALL PRIVILEGES ON xbmc_video.* TO xbmc@'%';



- rtrimarchi - 2010-03-29

I got "error 1133 (42000): Can't find any matching row in the user table"

PS: I have not imported any db so far......

PS2: I copied and pasted EXACTLY your command into the mysql command line client..


Any other idea Huh


- charrua - 2010-03-29

rtrimarchi Wrote:I got "error 1133 (42000): Can't find any matching row in the user table"
PS: I have not imported any db so far......
PS2: I copied and pasted EXACTLY your command into the mysql command line client..
Any other idea Huh
When it returns error 1133 run:

Code:
FLUSH PRIVILEGES;

After that run the GRANT statement again and then try if you can connect to the MySQL server from the machine running XBMC.


- rtrimarchi - 2010-03-30

No

same problem.... after the flush and the grant again No

It's a permission problem...but have no clue because I gave full admin to the user xbmc on the NAS Oo

Any idea Huh Huh


Update - rtrimarchi - 2010-03-30

Nod

I have replaced the username in the advancedsettings.xml from xbmc to root and it now works....

- It was able to create the database xbmc_video
- was able to import into this db the previoes export from a different PC

Now, going into video, with library mode it gives me all the movies with all the covers, fanarts, descriptions of the movies, etc,etc....but if I press the letter "I" in the keyboard...it does NOTHING Huh

Instead, going into movies with FILE Mode, I get no covers, no info ...no nothing ?

Is it normal ?

PS: I have not implemented so far the thumbnails mklink option yet...can it be the problem ?

One step ahead Nod

But.... do you guys have any idea why it is acting like this....and also the root issue Huh

Thanks as always Wink


- Briam - 2010-03-30

mysql binds access to localhost as standard on all platforms. To access the server on other computers you need to change the bind line as MrDVD or simply delete the line.
windows: C:\Program Files\MySQL\my.cnf

you need to forward port 3306 if your trying to access from outside. phpmyadmin uses port 80 so that can work even if the other isn't


- charrua - 2010-03-30

Briam Wrote:mysql binds access to localhost as standard on all platforms. To access the server on other computers you need to change the bind line as MrDVD or simply delete the line.
windows: C:\Program Files\MySQL\my.cnf
you need to forward port 3306 if your trying to access from outside. phpmyadmin uses port 80 so that can work even if the other isn't
But if that was the problem, he wouldn't be able to access the db as root neither...

@rtrimarchi
From the MySQL command line run:

Code:
SHOW GRANTS FOR xbmc;

then

Code:
SHOW GRANTS FOR root;

and compare which privileges you are missing for user xbmc.
Remember that privileges are assigned per user and host, so you may have privileges for user xbmc to access xbmc db from the localhost (the NAS in your case) but not from your other IPs.