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-04-29

lestat1977uk Wrote:its the root shouldn't it have everything, ah Super i remember that bad boy from my Ubuntu days, how do i add the extra permission levels?
Yes, it should. You can check it with:
Code:
SHOW GRANTS FOR root;



- hermy65 - 2010-04-29

Im going to be switching to a centralized database. My question is this, currently all of my videos (tv,movies) are stored on 3 drives locally on my main xbmc box. Im going to be moving everything to my new server so i can stream content to my other xbmc clients. My question is this, when i export my library, then move all of my media to my server and then re-import my library is it going to be messed up since the path of the videos has changed?


- lestat1977uk - 2010-04-29

yep it has super, hmmm


- RockDawg - 2010-04-30

hermy65 Wrote:Im going to be switching to a centralized database. My question is this, currently all of my videos (tv,movies) are stored on 3 drives locally on my main xbmc box. Im going to be moving everything to my new server so i can stream content to my other xbmc clients. My question is this, when i export my library, then move all of my media to my server and then re-import my library is it going to be messed up since the path of the videos has changed?

If the paths are different then yes. But what you could do relatively easily though is export your library, then open that file in a text editor and do a "find and replace" on the portion of the text string for the path that will change.


- lestat1977uk - 2010-04-30

It has the Super permission levels, any other thoughts on this??


- charrua - 2010-04-30

lestat1977uk Wrote:It has the Super permission levels, any other thoughts on this??
Try to create the trigger that was returning the error from MySQL command line and see what happens (look for the trigger creation command in the last log you've posted).


- lestat1977uk - 2010-04-30

how do you mean, sorry i'm still finding my feet with mysql


- charrua - 2010-04-30

lestat1977uk Wrote:how do you mean, sorry i'm still finding my feet with mysql
The same way you runned previous MySQL commands (e.g. the SHOW GRANTS, the CREATE DATABASE, etc.) run the command:

Code:
CREATE TRIGGER tgrAlbumInfo AFTER delete ON albuminfo FOR EACH ROW BEGIN delete from albuminfosong where albuminfosong.idAlbumInfo=old.idAlbumInfo;

To see if it returns the same error than it returns when XBMC tries to create the trigger.


- lestat1977uk - 2010-04-30

I get error 1064 when i do that?

mysql> select xbmc_music;
ERROR 1054 (42S22): Unknown column 'xbmc_music' in 'field list'
mysql> use xbmc_music;
Database changed
mysql> CREATE TRIGGER tgrAlbumInfo AFTER delete ON albuminfo FOR EACH ROW BEGIN
delete from albuminfosong where albuminfosong.idAlbumInfo=old.idAlbumInfo;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 1
mysql>


- charrua - 2010-04-30

lestat1977uk Wrote:I get error 1064 when i do that?

Code:
DELIMITER //
USE xbmc_music
CREATE TRIGGER tgrAlbumInfo AFTER delete ON albuminfo FOR EACH ROW BEGIN  delete from albuminfosong where  albuminfosong.idAlbumInfo=old.idAlbumInfo; END//



- lestat1977uk - 2010-04-30

i now get this did i do it right?

Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1460
Server version: 5.1.45-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> DELIMITER //
mysql> USE xbmc_music
Database changed
mysql> CREATE TRIGGER tgrAlbumInfo AFTER delete ON albuminfo FOR EACH ROW BEGIN
delete from albuminfosong where albuminfosong.idAlbumInfo=old.idAlbumInfo; END
//
Query OK, 0 rows affected (0.13 sec)

mysql>


- charrua - 2010-04-30

lestat1977uk Wrote:i now get this did i do it right?
Yes, but I don't know why you were receiving an 1142 error while trying to create the same trigger from XBMC.
You can try to drop the xbmc_music db (one more time... Smile) and then run XBMC on the same machine hosting the MySQL server to see if that solves the trigger creation error and finally XBMC is able to create the full music db (including views and triggers), then you can access it from anywhere.


- lestat1977uk - 2010-04-30

i have and nope, all of these test have been on the same machine as the mysql, its a server2008 machine.


- charrua - 2010-04-30

lestat1977uk Wrote:i have and nope, all of these test have been on the same machine as the mysql, its a server2008 machine.
The only other thing I can think you can do is to check the xbmc_music db sctructure, and add the missing parts (probably only views and the trigger you've already created) manually.

The list of the objects you should have:
--tables:
album
albuminfo
albuminfosong
artist
artistinfo
content
discography
exartistalbum
exartistsong
exgenrealbum
exgenresong
genre
karaokedata
path
song
thumb
version


--views:
songview
albumview

--trigger:
tgrAlbumInfo



- lestat1977uk - 2010-04-30

Fair play that may be the only way to go, just a question.. has anyone else done this yet, or am i the first to try doing music?