Help a newbie? (plugin jail, mysql & xbmc)

Status
Not open for further replies.

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
You need to enable it.
In the jail, type:
Code:
ee /etc/rc.conf

Then, add these lines:
Code:
mysql-enable="YES"

Optionally, you could also specify the location of the database with this line:
Code:
mysql_dbdir="/path/to/db"

After that, start the service using:
Code:
service mysql-server start

Once you've done these steps, mysql will start automatically in the future upon reboots.
 

seymour71

Dabbler
Joined
Sep 25, 2013
Messages
21
Nice one thanks mate, I'll give it a go later. How do I find out the IP address of the jail? I'm probably missing something obvious i know!
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
You should be able to find out the IP address of the jail from FreeNAS GUI under Jails page.
Double click the jail you're interested in. The IP address will be listed on the field labeled "IPv4 Address"
 

seymour71

Dabbler
Joined
Sep 25, 2013
Messages
21
Hi again, I've edited the rc.conf file, and everything went ok. When I double click on the jail, its IP address is: 192.168.1.6/24

I've edited the advancedsettings.xml file in xbmc but it isn't showing any of the content on Freenas, Did I mess up somewhere?
 

SmallGuy

Guru
Joined
Jun 7, 2013
Messages
560
1) Think typo ;)
2) Think permissions
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Just so you know, the IP address is 192.168.1.6, NOT 192.168.1.6/24
 

seymour71

Dabbler
Joined
Sep 25, 2013
Messages
21
I've changed the ip address in the advancedsettings file, but still the same. Any ideas where I've gone wrong?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Did you restart the service after doing so?
 

seymour71

Dabbler
Joined
Sep 25, 2013
Messages
21
Sorry dude, I'm confused - do I need to re-start the mysql service on Freenas? Or will a re-boot do it, as I switched it off last night.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
the setting for the IP that you changed is for xbmc, correct? so you want to restart xbmc service.
 

seymour71

Dabbler
Joined
Sep 25, 2013
Messages
21
Man, I'm sorry. I have maybe confused things.

The advancedsettings.xml file is on the xbmc box, that points to the jail ip address. I have changed this now - to 192.168.1.6 - but the xbmc box is still not finding the database. All my videos etc are still on the freenas box, and i can stream them fine.

One thing I am really confused about though - the freenas' ip is 192.168.1.4 - how will the xbmc box find the videos on there if it's looking in 192.168.1.6?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
I'm sorry, I've never used xbmc before, so I'm not entirely sure what that IP address setting on xbmc is supposed to do/be.
You just asked me how to find the jail IP and I just showed you the way (and it happened to find 192.168.1.6).

Someone else that's used xbmc before probably can help you better.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
What does your advancedsettings.xml look like from your xbmc machine?
 

seymour71

Dabbler
Joined
Sep 25, 2013
Messages
21
Hi mate, here is the output from my xbmc machines - both the same.

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.1.6</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>
 
    <musicdatabase>
        <type>mysql</type>
        <host>192.168.1.6</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>
 
    <videolibrary>
          <importwatchedstate>true</importwatchedstate>


I can add items to the library, but when I stop playing in one room, and start in another, it's not remembering the playback position.

Also, and this is a bit strange, on my Freenas machine, i have a few folders; Tv / Movies / Kids Films etc. it seems to add the Tv folder automatically, but not the others - i have to add them manually. Any Ideas?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Hi mate, here is the output from my xbmc machines - both the same.

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.1.6</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>
 
    <musicdatabase>
        <type>mysql</type>
        <host>192.168.1.6</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>
 
    <videolibrary>
          <importwatchedstate>true</importwatchedstate>


I can add items to the library, but when I stop playing in one room, and start in another, it's not remembering the playback position.

Also, and this is a bit strange, on my Freenas machine, i have a few folders; Tv / Movies / Kids Films etc. it seems to add the Tv folder automatically, but not the others - i have to add them manually. Any Ideas?


Sounds to me like you dont have your shares set up properly on FreeNAS or connected properly in XMBC.

Without more details of your configuration its hard to guess. Your advancedsettings look correct except I have one extra line in mine in each section (not sure if its needed, I have used this same settings file for over 2 years)

(Yes, I use a non-compliant, non-standard subnet for my main home network, ignore that)

Code:
<advancedsettings>
    <network>
        <disableipv6>true</disableipv6>
    </network>
    <fullscreen>true</fullscreen>
    <videodatabase>
        <type>mysql</type>
        <host>1.1.1.25</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>htpc_video</name>
    </videodatabase>
    <musicdatabase>
        <type>mysql</type>
        <host>1.1.1.25</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>htpc_music</name>
    </musicdatabase>
</advancedsettings>


Please verify your MySQL user has full access to those databases. If you have nothing else on the MySQL database, then you should be able to give that user full access to everything.

but you also need your sources.xml and mediasources.xml pointing to your FreeNAS box
mediasources.xml
Code:
<mediasources>
    <network>
        <location id="1">smb://1.1.1.19/music/</location>
        <location id="6">smb://1.1.1.90/movies</location>
        <location id="2">smb://1.1.1.90/tv</location>
    </network> </mediasources>


sources.xml
Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>movies</name>
            <path pathversion="1">smb://1.1.1.90/movies/</path>
        </source>
        <source>
            <name>tv</name>
            <path pathversion="1">smb://1.1.1.90/tv/</path>
        </source>
    </video>
    <music>
        <default pathversion="1">music</default>
        <source>
            <name>music</name>
            <path pathversion="1">smb://1.1.1.19/music/</path>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
        <source>
            <name>music</name>
            <path pathversion="1">smb://1.1.1.19/music/</path>
        </source>
        <source>
            <name>tv</name>
            <path pathversion="1">smb://1.1.1.90/tv/</path>
        </source>
        <source>
            <name>movies</name>
            <path pathversion="1">smb://1.1.1.90/movies/</path>
        </source>
    </files>
</sources>


I am not 100% sure that all of these are needed, but I have been using this same setup for over 2 years and have been able to do just as advertised with xmbc and mysql. Everything is tracked in mysql and all the xbmc machines work as intended.

As for this:
Also, and this is a bit strange, on my Freenas machine, i have a few folders; Tv / Movies / Kids Films etc. it seems to add the Tv folder automatically, but not the others - i have to add them manually. Any Ideas?

it would seem that something with your shares or layout is not correct. Do those folders/shares already exist on your FreeNAS?
 

seymour71

Dabbler
Joined
Sep 25, 2013
Messages
21
Hi mate, thanks for your input. Yes, these folders do already exist on the Freenas, and I can share them fine with xbmc.

Code:
Please verify your MySQL user has full access to those databases. If you have nothing else on the MySQL database, then you should be able to give that user full access to everything.
How could I check that mate?


Code:
but you also need your sources.xml and mediasources.xml pointing to your FreeNAS box
mediasources.xml

I take it these files are in the .xbmc/userdata folder mate? (I'm at work at the mo)
 
Status
Not open for further replies.
Top