Solved Seperate Mysql Databases
#1
hey guys i have 3 xbmc machines all connected currently to the one mysql database called myvideos75


it has been working great for watched status however i am finding the issue where someone else in the house on one of the bedroom machines watches an episode of something and when they are done it gets marked as watch which then means when i go to see that same show i can never remember what episode i was up to

so i want to keep using mysql to be able to resume movies or shows from one machine to the other but i also want to have seperate watched statuses between some of the machines in my house

i figured the easiest way to do this would be to remove one of the machines from connecting to the database and just having all watched status stored on the machine itself however this won't help with having to scan new content it won't be synced across to that machine it will have to be scanned individually

would simply having that one machine setup with a seperate profile cause mysql to create a seperate database but still sync over content scanned into the other database whilst leaving unwatched status unsynced or

can i somehow create a new database in mysql and then alter the advancedsettings.xml on that machine to make it the only one to connect to that database but once again would that still sync with the other database to provide new content whilst excluding watched status



as you can see i am a little confused on how to do it and if you are confused with my rambling basically what i want is

Machine 1 & 2 = same database / same scanned content / same watched status

Machine 3 = same scanned content / different watched status
Reply
#2
you can't have the same database and separate watched status
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
ok i mean more of having it when i scan the content into say machine 1 it will appear on machine 3 minus the watch status i have edited the advancedsettings.xml so that it creates another database which i have named xbmc_test

and it created the database in mysql so it says xbmc_test75 when i use the show databases; command in the terminal now i just need a way to sync the content over from the default myvideos75 database excluding the watched status part




I found a partial solution if i create a seperate profile then edit the profiles.xml so that

Quote: <hasdatabases>true</hasdatabases>
<canwritedatabases>false</canwritedatabases>


this will let me have access to the database but will not mark things as watched on this profile and will not show up as watched on other profiles

however not a real fix because it won't mark it as watch on that profile either and it still doesn't stop watched items appearing that were created in the master user profile


it appears the only way to do it is one of two ways


either stop the one machine from connecting to the database by deleting the advancedsettings.xml

or

create a seperate database by adding a name in the advancedsettings.xml and then having to re-scan everything back in on that seperate machine therefore having two identical databases but not syncing together this would of course stop the resume between machines option but that is not so much a concern as the watched status issue

also note that both of these options essentially do the same thing in that make the machine keeps it's own seperate database the only benefit of using a mysql database instead of just using it locally managed is if i need to re-install xbmc or something all i would need to do is add that advancedsettings.xml to the userdata folder and it essentially performs a sync onto the new xbmc installation as mysql basically keeps a backup of the database sort of like a cloud backup only on a LAN
Reply
#4
I have mine setup as 1 DB for me and my wife and 1 DB for only my wife. I setup a second profile for my wife that points to her DB and the master points to our DB. My wife profile is setup on all my XBMC machines so what ever she does follows her on all XBMc machines.
Image

If my replies help you, please click on my reputation Image below :) thanks :)
Reply
#5
so how did you make her profile connected to her specific database as currently what i have done is simply create a second database scanned everything into that and set the advanced settings on the seperate machine to link to just that database so the third machine is seperate from the other two this makes it so i cannot watch things on the third machine which is okay because it is in another family members bedroom and they essentially just have their own database now


but i like the idea of being about to login on any machine and have access to your own personal database that would make things easier so if that family member wanted to watch something on one of the other two machines they could just login to their profile and up comes their database with their watched status




Update: Nevermind i have done it for those looking for the same solution i will tell you what i did


First i created the second profile in xbmc as i left master user as the default one for all my stuff

then once the folder was created in the profiles folder of the userdata folder i then copied my advancedsettings.xml into the profile folder i just created then i opened it up in a text editor and then added

<name>Other_User</name> (substitute this name for whatever you want to call the database remembering it will have 75 for videos and 32 for music added to the end of it in the database)

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.1.21</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
       <name>Other_User</name>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.1.21</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>Other_User</name>
    </musicdatabase>
</advancedsettings>

then saved it so that profile folder has a differente advancedsettings.xml file than the one in the main folder which will link to the Master User default profile

i then started xbmc up waited about 30 seconds whilst the database got created i then went into profiles again and enabled the lock screen and made sure to edit the Other_User Profile so that Media Info is set to Seperate and Media Sources is set to Shares with default (this prevents you having to add sources again it will link with the ones already in the default Master User Profile)

then next i setup scrapers and scraped content in as normal

then when using the power button to exit or reboot there is now an option to log off the current user so you can switch between users each one with seperate databases and seperate watched status
Reply
#6
I was in a similar situation as you. I wanted to have multiple profiles (for the roommates and the cat) all synced across multiple xbmc computers. I followed the above instructions except the name had to be different for video and music databases. In XBMC 12.3 at least, the log suggested that XBMC found the rtwolf32 database and the rtwolf75 database, it tried to upgrade one to the other. So I just put rtwolf_music and rtwolf_video in the xml file and all is well.

To clarify, symptoms:

Scraping wasn't working. Set Content for the video path wouldn't "set". That is, it would go back to nothing even after I hit ok. Looking at the log I found these two entries that looked suspicious:
ERROR: CGUIWindowVideoBase::GetResumeItemOffset - Cannot open VideoDatabase
...
ERROR: Unable to copy old database rtwolf32 to new version rtwolf75

Solution: append _video and _audio to the name of the database in the advancedsettings.xml. Make sure they're different names so there'll be multiple databases created, two for each user/profile.

Anyone know if you can have the profile open on multiple xbmc sessions at once or should it be closed between each? I had it open accidently between two and it seemed to be fine but I may not wanna push my luck.

Sorry to dig up this old thread but I found it through google and wanted to post this for any future googlers.
Reply
#7
Use different names for music and videos
Reply
#8
Hi guys


i did all of the above - but have a feeling still there is a bug here. DB is created every time if finds something like the <name> i put into advancedsettings.xml.

meaning , i created a profile in one room called it A , a name of A_video then a DB was created for A = A_video75
on a second XBMC i tried to create this profile again with same settings as above , a new DB was created named A_video78

can someone explain how do i connect a profile on new XBMC machine to a profile DB already created ?

thanks

Shlomi

EDIT: found the answer here http://wiki.xbmc.org/index.php?title=XBM...s/Versions
Reply

Logout Mark Read Team Forum Stats Members Help
Seperate Mysql Databases0