On to next challenge : MySQL and XBMC! =)

Status
Not open for further replies.

Hanz001

Cadet
Joined
Sep 4, 2012
Messages
9
Hey all,
Total n00b here but I can follow instruction really well! :)

I have successfully installed FreeNAS 8.2 along with a jail and sabnzbd, sickbeard & couchpotato plugins and they all work great. I can access everything end ping out/in everywhere.

After reading this whole thread I decided to try and install mysql in the jail using the above listed method (pkg_add -r mysql55-server) and it went well... I also was able to add the mysql_enable="YES" to the rc.conf file and start the service. Then I added the xbmc user identified by xbmc and still everything is perfect.

But I think I'm missing something. I setup 2 windows PC's, installed xbmc, copy and pasted the advancedsettings.xml file in to the user data on both machines and edited them to be similar. FYI - My jail IP which is running mysql is 192.168.98.100 & my FreeNAS is being shared as smb://FREENAS; Which I changed all of my paths appropriately within the advancedsettings.xml file. However I'm not showing that the settings are being shared between the two xbmc installs.

MY question I guess is how do I 1. check that the sql server is running and accessible from the other pc's, and 2. how do I ensure the stuff inside xbmc is being saved to the mysql DB?

Did I miss the part where I was supposed to create a DB within the mysql server (all I did was create the xbmc user and grant all access). If so, could someone walk me through it if possible? Sorry for the trouble and punt me to the right place if this isn't it please.

Thanks,
Hanz
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
You don't need to create the db, as long as the xbmc user has the ability to create databases it will create one called 'MyVideo54' or something like that I believe. Check you mysql server too see if any new tables showed up, just google how to list tables.
 

Hanz001

Cadet
Joined
Sep 4, 2012
Messages
9
Just FYI - I Figured it out and it was a rather dumb mistake on my part. I put the advancedsettings.xml in to the windows C:\program files\XBMC\userdata folder instead of the Users\<your_user_name>\AppData\Roaming\XBMC\userdata\ folder.

Woops... hope my idiot mistake helps someone else out that may have read the instructions above wrong.

Joshua,
Thanks for the response and sorry for wasting your time. You do a lot of great work here!
 

essem_9

Cadet
Joined
Sep 9, 2012
Messages
1
Team,
I just finished building my new FreeNAS box. My goal is to run zoneminder and wordpress both of which require Mysql. I have followed the instructions on this thread and was able to successfully install mysql inside the jail.

I have also created a mount point. The problem is I can't access the database remotely from another computer. I can ping my jail IP. I also made a copy of my.cnf and added a bind-address. In order for zoneminder and wordpress to install they need access to MySQL. Following are some outputs:

From REMOTE machine:
home@home ~ $ ping 192.168.2.56
PING 192.168.2.56 (192.168.2.56) 56(84) bytes of data.
64 bytes from 192.168.2.56: icmp_req=1 ttl=64 time=8.71 ms
64 bytes from 192.168.2.56: icmp_req=2 ttl=64 time=0.356 ms
^C
--- 192.168.2.56 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.356/4.535/8.714/4.179 ms

home@home ~ $ mysql -u root -h 192.168.2.56
ERROR 1130 (HY000): Host '192.168.2.7' is not allowed to connect to this MySQL server
home@home ~ $ mysql -u wordpress -h 192.168.2.56
ERROR 1130 (HY000): Host '192.168.2.7' is not allowed to connect to this MySQL server

On FREENAS
homejail# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.9 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> show DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| wordpress |
| zoneminder |
+--------------------+
5 rows in set (0.02 sec)

mysql> quit
Bye
homejail# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether xx:xx:xx:xx:xx:xx
inet 192.168.2.56 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::e2:52ff:fe00:60b%epair0b prefixlen 64 scopeid 0x2
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active

Any help will be appreciated!! Thanks in advance
 

bcrowder

Dabbler
Joined
Jan 6, 2012
Messages
36
Joshua Parker Ruehlig, will the upgrade to V.3 from 2 hose my SQL XMBC setup? have you done this? Last time I had to rescan, takes a day.

Thanks,
Bill
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Joshua Parker Ruehlig, will the upgrade to V.3 from 2 hose my SQL XMBC setup? have you done this? Last time I had to rescan, takes a day.

Thanks,
Bill

V3 of what? If your gonna do it, make sure to backup your database. you can dump it in mysql (google it) and also use the tool in xbmc to backup the video + music librarys.
 

bcrowder

Dabbler
Joined
Jan 6, 2012
Messages
36
V3 of what? If your gonna do it, make sure to backup your database. you can dump it in mysql (google it) and also use the tool in xbmc to backup the video + music librarys.

Thanks Joshua,

Sorry mistyped V3 for .3.

Got my answer without losing my SQL setup. Since I don't use anything in the jails besides SQL for XMBC Frodo, I just updated Freenas to 8.3 and DID NOT update the jail. Updated ZFS to V.28 on all 4 pools, and all was good.

William Grzybowski posted the answer on another thread.

Thanks,
Bill
 

bbddpp

Explorer
Joined
Dec 8, 2012
Messages
91
Those who have this working...I'm having some DB issues with Frodo (lots of errors in xbmc.log). Want to delete my DBs and start over, but am getting:

Error on delete of ‘./database//db.opt’ (Errcode: 13)

Type errors when I try and do a DROP logged in as myself, mysql, root, or xbmc. Permissions issue somewhere here. But I can't seem to locate where db.opt is being stored on the filesystem. Help?

BTW I did allow Frodo beta 3 to create MyVideos and MyMusic DBs, just seems that now that it created it, I don't have the rights to delete the darn things!
 

bcrowder

Dabbler
Joined
Jan 6, 2012
Messages
36
I have been running Frodo flawlessly since the nightlys, I would suggest you start over and follow the instructions again. I have 4 clients and have no problems, so much so I don't pay much attention to it anymore, it just works.

Thanks,
Bill

Those who have this working...I'm having some DB issues with Frodo (lots of errors in xbmc.log). Want to delete my DBs and start over, but am getting:

Error on delete of ‘./database//db.opt’ (Errcode: 13)

Type errors when I try and do a DROP logged in as myself, mysql, root, or xbmc. Permissions issue somewhere here. But I can't seem to locate where db.opt is being stored on the filesystem. Help?

BTW I did allow Frodo beta 3 to create MyVideos and MyMusic DBs, just seems that now that it created it, I don't have the rights to delete the darn things!
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
hi i cant install this on freenas 8.3 rc1 as it says during the ftp process cant find file freebsd 8.3

anyone know a work around...

thanx
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
hi i cant install this on freenas 8.3 rc1 as it says during the ftp process cant find file freebsd 8.3

anyone know a work around...

thanx

what's the exact error message? can you ping google.com from within your jail?
 

tlipur

Dabbler
Joined
Jul 9, 2012
Messages
11
im stuck, what is the password?

[root@freenas ~]# jexec 1 csh
jail# mysql -u root -p
Enter password: q
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
ES)

also im not using window for xmbc. using openelec on 4 boxes. how would i get to the xml file?
 

ShinobiX9X

Contributor
Joined
Mar 6, 2013
Messages
141
Hello,

I thought i installed mysql in my freenas jail with xbmc as the steps mentioned in the first posts.
when i do the shell command in jail, it does say mysql is running.
But now, (and this is something i never did before) the share is NFS now, when i add the movie nfs folder, that's no problem, but it doesn't want to make the library. (all the nfo and posters etc, are saved together with the movie in the folder with mediaelch)

any ideas? maybe it's the nfs that i didn't set correct, or the mysql or both :(

1 windows htpc with xbmc, and 1 raspberry pi with raspbmc.
 

coredalae

Cadet
Joined
Feb 24, 2013
Messages
6
I got this running, but my XBMC started to be super slow. Guess that is because the mysql db is on the same disk as my sab download dir.

Would more ram fix this ? (have 8gb ram, 1 250gb disk as DL/jail, 5x 3tb in raid Z intel pentium something (sandybridge)cpu)
 

fernicus

Cadet
Joined
Mar 19, 2013
Messages
7
I'm hoping someone can help me with this because every step has been a research project. But I've created the jail, finally installed the #in freenas shell
mysql55-server and mysql55-client. The "mysql_secure_installation" says it's not a recognized command. And when I try vi /etc/rc.conf and mysql_enable="YES", it says it's read only and I cannot add a line. I've looked everywhere on how to do this, and have made sure that all the read and write boxes are checked for all of my datasets. What am I doing wrong? FreeNAS is going to make me go insane.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'm hoping someone can help me with this because every step has been a research project. But I've created the jail, finally installed the #in freenas shell
mysql55-server and mysql55-client. The "mysql_secure_installation" says it's not a recognized command. And when I try vi /etc/rc.conf and mysql_enable="YES", it says it's read only and I cannot add a line. I've looked everywhere on how to do this, and have made sure that all the read and write boxes are checked for all of my datasets. What am I doing wrong? FreeNAS is going to make me go insane.

/etc/rc.conf shouldn't be read only in your jail. I bet you're in your FreeNAS userland, and forgot to 'jexec # csh'.
 

fernicus

Cadet
Joined
Mar 19, 2013
Messages
7
I think I've finally got mySQL to work on my XBMC setup. I have one more question....how can I view my videos database that was created in mySQL? I have a program that I use to manually change certain things in the video60.db, but now that it's on mySQL, I can't figure out a way to point that program to it? Can I access this file in windows explorer?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I think I've finally got mySQL to work on my XBMC setup. I have one more question....how can I view my videos database that was created in mySQL? I have a program that I use to manually change certain things in the video60.db, but now that it's on mySQL, I can't figure out a way to point that program to it? Can I access this file in windows explorer?

No, mysql is a dedicated database that has a daemon running to accept requests. You use 'mysql -u root -p' like my guide on the second page. This then drops you in a sql shell where you can run your queries.

You usually only manipulate .db files for file based databases like sqlite.
 

ShinobiX9X

Contributor
Joined
Mar 6, 2013
Messages
141
Ok, high Joel, this time i got sql working with your guide (also thanks to you openvpn works as well ;))
just a question, i only set library in advancedsettings, what is the rest you ppl add for?
do i need to make those folrders for that?

regards,
Dimitri
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I think I've finally got mySQL to work on my XBMC setup. I have one more question....how can I view my videos database that was created in mySQL? I have a program that I use to manually change certain things in the video60.db, but now that it's on mySQL, I can't figure out a way to point that program to it? Can I access this file in windows explorer?

This may be a little late, but there are plenty of valid reasons to know where the files are stored. Here's how you can find that information:

mysql -u root
mysql> select @@datadir;
 
Status
Not open for further replies.
Top