SQL Database Error
#1
Hey everyone,

I've been using XBMC for a few years now and I decided to migrate to a SQL database hosted on my Ubuntu server.

For some reason the database is empty and I get this error on the client.

20:27:44 T:140704892487552 ERROR: Unable to open database: xbmc44 [1045](Access denied for user 'xbmc'@localhost (using password: YES))
I tried changing the settings around a little bit and got the same error
20:41:30 T:140269880133504 ERROR: Unable to open database: MyVideos60 [1049](Unknown database 'MyVideos60')
The XBMC client and the server are on the same machine. Here are my advanced settings .xml
<advancedsettings>
<video>
<smallstepbackseconds>8</smallstepbackseconds>
</video>
<videodatabase>
<type>mysql</type>
<host>2.2.2.2</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<advancedsettings>
<pathsubstitution>
<substitute>
<from>/media/1twd/DVD</from>
<to>SMB://2.2.2.2/DVD_1twd</to>
</substitute>
</pathsubstitution>
</advancedsettings>
</advancedsettings>

PLEASE HELP! I'm using 12.04 64 bit and XBMC 11
Reply
#2
(2012-07-11, 02:43)bumperjeep Wrote: Hey everyone,

I've been using XBMC for a few years now and I decided to migrate to a SQL database hosted on my Ubuntu server.

For some reason the database is empty and I get this error on the client.

20:27:44 T:140704892487552 ERROR: Unable to open database: xbmc44 [1045](Access denied for user 'xbmc'@localhost (using password: YES))
I tried changing the settings around a little bit and got the same error
20:41:30 T:140269880133504 ERROR: Unable to open database: MyVideos60 [1049](Unknown database 'MyVideos60')
The XBMC client and the server are on the same machine. Here are my advanced settings .xml
<advancedsettings>
<video>
<smallstepbackseconds>8</smallstepbackseconds>
</video>
<videodatabase>
<type>mysql</type>
<host>2.2.2.2</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<advancedsettings>
<pathsubstitution>
<substitute>
<from>/media/1twd/DVD</from>
<to>SMB://2.2.2.2/DVD_1twd</to>
</substitute>
</pathsubstitution>
</advancedsettings>
</advancedsettings>

PLEASE HELP! I'm using 12.04 64 bit and XBMC 11

First get rid of the lines highlighted in red above from advancedsettings, there should be <advancedsettings> and</advancedsettings> at beginning and end only. This will probably NOT fix your problem, it looks to me like a permission problem, make sure user xbmc has FULL permissions for MySql including create.

Mike


If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#3
I also recommend checking out the HOW-TO:Sync multiple libraries wiki page which has a step by step guide to setting up MySQL, etc for use with XBMC...
Reply
#4
Thats the instructions I was using. Looks like I got the SQL library working. How does the advanced settings change when I shift it over to a Windows client that accesses the files over the network. Here is my advanced settings for my client which is on the same machine as the server.
I want to sync the sources too, so I made the sources network shares. Also, I want to sync the bookmarks. Are the bookmarks grouped by file? In other words, Is there a way to see ALL my bookmarks for the variety of files they are associated with? Thanks for the help so far, that extra line definitely helped when it was removed.
<advancedsettings>
<video>
<smallstepbackseconds>8</smallstepbackseconds>
</video>
<videodatabase>
<type>mysql</type>
<host>2.2.2.2</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>2.2.2.2</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
<pathsubstitution>
<substitute>
<from>/media/1twd/DVD</from>
<to>SMB://2.2.2.2/DVD_1twd</to>
<from>/media/500green/HD_Movies</from>
<to>SMB://2.2.2.2/500green/HD_Movies</to>
<from>/media/640/Comedy</from>
<to>SMB://2.2.2.2/640/Comedy</to>
<from>/media/2s/</from>
<to>SMB://2.2.2.2/2s/</to>
</substitute>
<substitute>
<from>special://masterprofile/favourites.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/favourites.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/sources.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/sources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/mediasources.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/mediasources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/favourites.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/favourites.xml</to>
</substitute>
</pathsubstitution>
</advancedsettings>
Reply
#5
(2012-07-11, 17:01)bumperjeep Wrote: Thats the instructions I was using. Looks like I got the SQL library working. How does the advanced settings change when I shift it over to a Windows client that accesses the files over the network. Here is my advanced settings for my client which is on the same machine as the server.
I want to sync the sources too, so I made the sources network shares. Also, I want to sync the bookmarks. Are the bookmarks grouped by file? In other words, Is there a way to see ALL my bookmarks for the variety of files they are associated with? Thanks for the help so far, that extra line definitely helped when it was removed.
<advancedsettings>
<video>
<smallstepbackseconds>8</smallstepbackseconds>
</video>
<videodatabase>
<type>mysql</type>
<host>2.2.2.2</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>2.2.2.2</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
<pathsubstitution>
<substitute>
<from>/media/1twd/DVD</from>
<to>SMB://2.2.2.2/DVD_1twd</to>
<from>/media/500green/HD_Movies</from>
<to>SMB://2.2.2.2/500green/HD_Movies</to>
<from>/media/640/Comedy</from>
<to>SMB://2.2.2.2/640/Comedy</to>
<from>/media/2s/</from>
<to>SMB://2.2.2.2/2s/</to>
</substitute>

<substitute>
<from>special://masterprofile/favourites.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/favourites.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/sources.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/sources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/mediasources.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/mediasources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/favourites.xml</from>
<to>SMB://2.2.2.2/jj/.xbmc/userdata/favourites.xml</to>
</substitute>
</pathsubstitution>
</advancedsettings>

If your sources only include network paths I don't see the point of the red above but you know your setup better than me. I keep a copy of sources.xml and advancedsettings.xml on a share on the server and copy them over to my individual installs when I install. As these files are static once you're set up I don't see the point in complicating things with path substitution, I have also had problems with substitution working on some things. WARNING ADVANCED SETUP: advancessettings.xml is read from 2 places, userdata and system, settings that are common to all systems I put in the system advancedsettings, settings specific to an individual machine I put in userdata. Settings in userdata only apply to the logged in user, settings in system apply to all users. Userdata overrides system if the same settings are in both. sources.xml needs to be an EXACT duplicate on all systems or you will get duplicates in your database.



If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#6
So I'll have the same advanced setting regardless of the client, even though the server has a client on the same box?
Reply
#7
Your box should be able to resolve the network path even though it is ultimately a loopback connection. So yes, the same sources and advancedsettings on all should work, unless you have individual tweaks on specific machines. For example on my RaspberryPi there are lines added to advancedsettings to compensate for its slow processor. These lines are added to the "stock" advancedsettings.
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#8
Thanks for all your help Dilligaf! Now what is the procedure to add new clients to the library? I know I need to copy advanced settings right, but I also need to export the library from the machine that has the master copy of the database (the HTPC Ubuntu machine) and import it through right? Are my sources and bookmarks coding in advanced settings correct? What is the general consensus about syncing thumbnails? I don't want to constantly slow down the library, I would only want new thumbnails to be downloaded for new movies or if they were updated. Is there anyway to do this without slowing down the xbmc interface?
Reply
#9
Simply copy advancedsettings and sources.xml to the new client. You may need to go to videos/files and right click on the individual sources and "change content" or "edit source" to tell XBMC what type of files are there, not sure if this is needed. You can export the database from the original machine before adding advancedsettings and reimport after. Or just scan for new content without importing anything No need to reimport the database on other installs as it's on the MySql server and will be read by XBMC. I don't bother synching thumbnails but the downside to that is I have to "scan for new content" on each machine in order to get thumbnails, the wiki explains how to synch thumbnails. All other info is read from MySql.
I personally prefer to export my database as individual files, this puts all metadata in my individual movie/tv folders making scanning quicker, thumbnails are also picked up from here, perhaps why I don't bother to share them. The downside to individual exports id it can "clutter" your media folders. I already pointed out what I saw wrong with your advancedsettings. Scanning takes time and does slow down the machine but you don't have to scan that often and you can always set it to scan and then go to bed Smile Looking again at your advsettings, I would eliminate ALL the substitutions that you have there. you can add a thumbnails substitution if you want.
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#10
I already have the meta data in the media folders, I don't care if they are cluttered. In fact I prefer it because I can tell if XBMC should see it just by looking at the folder in a file browser. Any reason why some movies play and others say that the file cant be found because it was removed from the library?
Reply
#11
Probably permission problems you can add user and pass to sources.xml

<path>smb://user:pass@servername/share/tv</path>

If you do this then edit one copy of sources.xml and copy it to ALL other instances of XBMC
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#12
This worked perfectly for my for Linux client, having trouble actually connecting to shares on windows though, it says the files aren't available in the library
Reply

Logout Mark Read Team Forum Stats Members Help
SQL Database Error0