HowTo: Centralize Your XBMC Library with MySQL


Recommended Posts

Thank you Tight_Wad.

 

The MySQL stuff is way over my head... I blindly followed the Lifehacker guide.

 

I did enter the indexing commands for my movies, and saw no load speed difference in my ATV2 XBMC client. I am sure the bottleneck is the ATV itself and not the network or database. I will test it out on my Atom XBMC Live.

 

 

Link to comment
  • Replies 195
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I'm getting ready to start setting Mysql up on my unRaid, but have a couple questions please.

 

How necessary is it to have a cache drive with a swapfile, for being able to use Mysql on the unRaid ?  Wouldn't increasing the Ram be an option instead of using a swapfile, or am I not understanding the actual use of swapfiles?

 

Also, is it better to have the Mysql setup on a cache drive since it is not in the array as apposed to just having it on one of the drives that is in the array?

 

 

Link to comment

Been having issues with my drive holding the mysql database filling up lately and causing tables to corrupt. I want to store it on the cache drive instead, but how do I stop the mover script from trying to move the database everynight?

 

Thanks :)

 

I created my own MySQL share on one of the drives (disk1) and this is where it goes. The swap file is in my cache drive and I named the file .swapfile, this gets ignored (I believe) by the mover script. This is the default setting for the swapfile in unMenu.

Link to comment

Please correct me if I'm wrong but isnt the swap file used just when you run out of memory (RAM)?

 

I want to actually store the MySQL folder that is created on disk1 when you install with unMENU onto the cache drive but it needs a . before the folder name so it doesn't get moved off of the cache drive I think.

 

I think I need to edit: mysql-unmenu-package.conf

#UNMENU_RELEASE $Revision$ $Date$
PACKAGE_NAME mysql (SQL-based relational database server)
PACKAGE_DESCR MySQL is a fast, multi-threaded, multi-user, and robust SQL
PACKAGE_DESCR (Structured Query Language) database server.  It comes with a nice API
PACKAGE_DESCR which makes it easy to integrate into other applications.
PACKAGE_DESCR The home page for MySQL is http://www.mysql.com/
PACKAGE_URL http://slackware.cs.utah.edu/pub/slackware/slackware-12.2/slackware/ap/mysql-5.0.67-i486-1.tgz
PACKAGE_FILE mysql-5.0.67-i486-1.tgz
PACKAGE_MD5 2152772395c13f5af16874760105a33d
PACKAGE_INSTALLED /usr/bin/mysql
PACKAGE_DEPENDENCIES none
PACKAGE_VARIABLE Hostname||vHOSTNAME=Tower||Hostname of unRAID server
PACKAGE_VARIABLE Disk Label||vDISKLABEL=disk1||Disk for installation and databases, e.g. disk1, disk2, etc
PACKAGE_VARIABLE MySQL root Password||vROOTPWD=your_password||Password for user 'root'
PACKAGE_VARIABLE First Database||vDATABASE=Tower||First Database to create
PACKAGE_VARIABLE Database User||vDBUSER=root||User for First Database (GRANT ALL PRIVILEGES)
PACKAGE_VARIABLE Database User Password||vDBUSERPWD=your_password||Password for Database User
PACKAGE_VARIABLE Custom parameters||vDBCUSTOM=||Custom options parsed to MySQL. See more info <a href="http://dev.mysql.com/doc/refman/5.0/en/mysqld-safe.html">here</a>.
PACKAGE_INSTALLATION killall mysqld
PACKAGE_INSTALLATION installpkg mysql-5.0.67-i486-1.tgz
PACKAGE_INSTALLATION mkdir -p /var/run/mysql
PACKAGE_INSTALLATION [ ! -d /mnt/${vDISKLABEL-disk1}/mysql ] && mkdir /mnt/${vDISKLABEL-disk1}/mysql
PACKAGE_INSTALLATION cp /etc/my-medium.cnf /etc/my.cnf
PACKAGE_INSTALLATION sed -i -e "s/#innodb_data_home_dir = \/var\/lib\/mysql\//innodb_data_home_dir = \/mnt\/${vDISKLABEL-disk1}\/mysql\//" /etc/my.cnf
PACKAGE_INSTALLATION sed -i -e "s/#innodb_log_group_home_dir = \/var\/lib\/mysql\//innodb_log_group_home_dir = \/mnt\/${vDISKLABEL-disk1}\/mysql\//" /etc/my.cnf
PACKAGE_INSTALLATION sed -i -e "s/#innodb_log_arch_dir = \/var\/lib\/mysql\//innodb_log_arch_dir = \/mnt\/${vDISKLABEL-disk1}\/mysql\//" /etc/my.cnf
PACKAGE_INSTALLATION [ ! -d /mnt/${vDISKLABEL-disk1}/mysql/mysql ] && /usr/bin/mysql_install_db --datadir=/mnt/${vDISKLABEL-disk1}/mysql/ --user=root
PACKAGE_INSTALLATION cd /usr ; /usr/bin/mysqld_safe --datadir=/mnt/${vDISKLABEL-disk1}/mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid &
PACKAGE_INSTALLATION sleep 10
PACKAGE_INSTALLATION [ ! -e /mnt/${vDISKLABEL-disk1}/mysql/.unmenu ] && /usr/bin/mysqladmin -u root password ${vROOTPWD-your_password}
PACKAGE_INSTALLATION [ ! -e /mnt/${vDISKLABEL-disk1}/mysql/.unmenu ] && /usr/bin/mysqladmin -u root -h ${vHOSTNAME-Tower} --password=${vROOTPWD-your_password} password ${vROOTPWD-your_password}
PACKAGE_INSTALLATION mysql -u root --password=${vROOTPWD-your_password} -e "GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '${vROOTPWD-your_password}' WITH GRANT OPTION;"
PACKAGE_INSTALLATION [ ! -d /mnt/${vDISKLABEL-disk1}/mysql/${vDATABASE-Tower} ] && /usr/bin/mysqladmin -u root -h ${vHOSTNAME-Tower} --password=${vROOTPWD-your_password} create ${vDATABASE-Tower}
PACKAGE_INSTALLATION [ -d /mnt/${vDISKLABEL-disk1}/mysql/${vDATABASE-Tower} ] && mysql -u root -h ${vHOSTNAME-Tower} --password=${vROOTPWD-your_password} --database=${vDATABASE-Tower} -e "GRANT ALL PRIVILEGES ON ${vDATABASE-Tower}.* TO ${vDBUSER-root}@'%' IDENTIFIED BY '${vDBUSERPWD-your_password}';"
PACKAGE_INSTALLATION [ -d /mnt/${vDISKLABEL-disk1}/mysql/test ] && /usr/bin/mysqladmin -u root -h ${vHOSTNAME-Tower} -f --password=${vROOTPWD-your_password} drop test
PACKAGE_INSTALLATION touch /mnt/${vDISKLABEL-disk1}/mysql/.unmenu
PACKAGE_INSTALLATION [ ! -d /etc/rc.d/unraid.d ] && mkdir /etc/rc.d/unraid.d
PACKAGE_INSTALLATION echo 'case $1 in' >/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "start)" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "cd /usr" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "/usr/bin/mysqld_safe --datadir=/mnt/${vDISKLABEL-disk1}/mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid ${vDBCUSTOM} &" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo ";;" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "stop)" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "  killall mysqld " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "  # Wait for up to one minute for it to exit, as we don't know how big the DB is...  " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "  for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 \\" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     if [ ! -r /var/run/mysql/mysql.pid ]; then " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "       break; " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     fi " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     sleep 1 " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "   done " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo ";;" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "esac" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION chmod +x /etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_VERSION_TEST mysql --version 2>&1 | grep Distrib | awk '{print $5}'
PACKAGE_VERSION_STRING 5.0.67,
PACKAGE_MEMORY_USAGE May be huge

 

I think it's just the lines that create the mysql folder that need to be altered. I'm gonna give it a go later but for now I'm trying to work out why the mover script has allowed my cache drive to fill up too lol!

 

Link to comment

Just done it. Seems to work fine.

 

This is my edited version of the file:

#UNMENU_RELEASE $Revision$ $Date$
PACKAGE_NAME mysql (SQL-based relational database server)
PACKAGE_DESCR MySQL is a fast, multi-threaded, multi-user, and robust SQL
PACKAGE_DESCR (Structured Query Language) database server.  It comes with a nice API
PACKAGE_DESCR which makes it easy to integrate into other applications.
PACKAGE_DESCR The home page for MySQL is http://www.mysql.com/
PACKAGE_URL http://slackware.cs.utah.edu/pub/slackware/slackware-12.2/slackware/ap/mysql-5.0.67-i486-1.tgz
PACKAGE_FILE mysql-5.0.67-i486-1.tgz
PACKAGE_MD5 2152772395c13f5af16874760105a33d
PACKAGE_INSTALLED /usr/bin/mysql
PACKAGE_DEPENDENCIES none
PACKAGE_VARIABLE Hostname||vHOSTNAME=Tower||Hostname of unRAID server
PACKAGE_VARIABLE Disk Label||vDISKLABEL=disk1||Disk for installation and databases, e.g. disk1, disk2, etc
PACKAGE_VARIABLE MySQL root Password||vROOTPWD=your_password||Password for user 'root'
PACKAGE_VARIABLE First Database||vDATABASE=Tower||First Database to create
PACKAGE_VARIABLE Database User||vDBUSER=root||User for First Database (GRANT ALL PRIVILEGES)
PACKAGE_VARIABLE Database User Password||vDBUSERPWD=your_password||Password for Database User
PACKAGE_VARIABLE Custom parameters||vDBCUSTOM=||Custom options parsed to MySQL. See more info <a href="http://dev.mysql.com/doc/refman/5.0/en/mysqld-safe.html">here</a>.
PACKAGE_INSTALLATION killall mysqld
PACKAGE_INSTALLATION installpkg mysql-5.0.67-i486-1.tgz
PACKAGE_INSTALLATION mkdir -p /var/run/mysql
PACKAGE_INSTALLATION [ ! -d /mnt/${vDISKLABEL-disk1}/.mysql ] && mkdir /mnt/${vDISKLABEL-disk1}/.mysql
PACKAGE_INSTALLATION cp /etc/my-medium.cnf /etc/my.cnf
PACKAGE_INSTALLATION sed -i -e "s/#innodb_data_home_dir = \/var\/lib\/mysql\//innodb_data_home_dir = \/mnt\/${vDISKLABEL-disk1}\/.mysql\//" /etc/my.cnf
PACKAGE_INSTALLATION sed -i -e "s/#innodb_log_group_home_dir = \/var\/lib\/mysql\//innodb_log_group_home_dir = \/mnt\/${vDISKLABEL-disk1}\/.mysql\//" /etc/my.cnf
PACKAGE_INSTALLATION sed -i -e "s/#innodb_log_arch_dir = \/var\/lib\/mysql\//innodb_log_arch_dir = \/mnt\/${vDISKLABEL-disk1}\/.mysql\//" /etc/my.cnf
PACKAGE_INSTALLATION [ ! -d /mnt/${vDISKLABEL-disk1}/.mysql/mysql ] && /usr/bin/mysql_install_db --datadir=/mnt/${vDISKLABEL-disk1}/.mysql/ --user=root
PACKAGE_INSTALLATION cd /usr ; /usr/bin/mysqld_safe --datadir=/mnt/${vDISKLABEL-disk1}/.mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid &
PACKAGE_INSTALLATION sleep 10
PACKAGE_INSTALLATION [ ! -e /mnt/${vDISKLABEL-disk1}/.mysql/.unmenu ] && /usr/bin/mysqladmin -u root password ${vROOTPWD-your_password}
PACKAGE_INSTALLATION [ ! -e /mnt/${vDISKLABEL-disk1}/.mysql/.unmenu ] && /usr/bin/mysqladmin -u root -h ${vHOSTNAME-Tower} --password=${vROOTPWD-your_password} password ${vROOTPWD-your_password}
PACKAGE_INSTALLATION mysql -u root --password=${vROOTPWD-your_password} -e "GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '${vROOTPWD-your_password}' WITH GRANT OPTION;"
PACKAGE_INSTALLATION [ ! -d /mnt/${vDISKLABEL-disk1}/.mysql/${vDATABASE-Tower} ] && /usr/bin/mysqladmin -u root -h ${vHOSTNAME-Tower} --password=${vROOTPWD-your_password} create ${vDATABASE-Tower}
PACKAGE_INSTALLATION [ -d /mnt/${vDISKLABEL-disk1}/.mysql/${vDATABASE-Tower} ] && mysql -u root -h ${vHOSTNAME-Tower} --password=${vROOTPWD-your_password} --database=${vDATABASE-Tower} -e "GRANT ALL PRIVILEGES ON ${vDATABASE-Tower}.* TO ${vDBUSER-root}@'%' IDENTIFIED BY '${vDBUSERPWD-your_password}';"
PACKAGE_INSTALLATION [ -d /mnt/${vDISKLABEL-disk1}/.mysql/test ] && /usr/bin/mysqladmin -u root -h ${vHOSTNAME-Tower} -f --password=${vROOTPWD-your_password} drop test
PACKAGE_INSTALLATION touch /mnt/${vDISKLABEL-disk1}/.mysql/.unmenu
PACKAGE_INSTALLATION [ ! -d /etc/rc.d/unraid.d ] && mkdir /etc/rc.d/unraid.d
PACKAGE_INSTALLATION echo 'case $1 in' >/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "start)" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "cd /usr" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "/usr/bin/mysqld_safe --datadir=/mnt/${vDISKLABEL-disk1}/.mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid ${vDBCUSTOM} &" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo ";;" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "stop)" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "  killall mysqld " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "  # Wait for up to one minute for it to exit, as we don't know how big the DB is...  " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "  for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 \\" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     if [ ! -r /var/run/mysql/mysql.pid ]; then " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "       break; " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     fi " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "     sleep 1 " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "   done " >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo ";;" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION echo "esac" >>/etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_INSTALLATION chmod +x /etc/rc.d/unraid.d/rc.unraid_mysqld
PACKAGE_VERSION_TEST mysql --version 2>&1 | grep Distrib | awk '{print $5}'
PACKAGE_VERSION_STRING 5.0.67,
PACKAGE_MEMORY_USAGE May be huge

 

I've just added . in front of the mysql folder that gets put on the drive you set. So in the unmenu configuration values I've set the Disk Label field to cache and then when the folder is created by the script it puts a . in front which should stop the mover script from moving it from the cache drive onto the array.

 

BTW the file is located at: \\servername\flash\packages

Link to comment
  • 1 month later...

Since I'm running 5.0b7 my MySQL installation isn't working anymore, at least XBMC isn't showing the Video database (I just came from 5.0b6 and didn't changed anything else).

 

The process seems to be running:

 

root@Tower:~# ps -ef | grep mysql
root      2691     1  0 12:42 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/mnt/disk1/mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid
root      2723  2691  0 12:42 ?        00:00:02 /usr/libexec/mysqld --basedir=/usr --datadir=/mnt/disk1/mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid --skip-external-locking --port=3306 --socket=/var/run/mysql/mysql.sock
root     19304 19290  0 13:44 pts/2    00:00:00 grep mysql

 

I connected to my unraid server with the same credentials I was setting up for the MySQL install with the help of Sequel Pro on my Mac and it's showing, that the Video database is nicely used.

 

What else to check?

Link to comment

Since I'm running 5.0b7 my MySQL installation isn't working anymore, at least XBMC isn't showing the Video database (I just came from 5.0b6 and didn't changed anything else).

 

The process seems to be running:

 

root@Tower:~# ps -ef | grep mysql
root      2691     1  0 12:42 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/mnt/disk1/mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid
root      2723  2691  0 12:42 ?        00:00:02 /usr/libexec/mysqld --basedir=/usr --datadir=/mnt/disk1/mysql/ --user=root --pid-file=/var/run/mysql/mysql.pid --skip-external-locking --port=3306 --socket=/var/run/mysql/mysql.sock
root     19304 19290  0 13:44 pts/2    00:00:00 grep mysql

 

I connected to my unraid server with the same credentials I was setting up for the MySQL install with the help of Sequel Pro on my Mac and it's showing, that the Video database is nicely used.

 

What else to check?

permissions for it to open the files it needs.
Link to comment

Hi, I'm having a similar error. I have 5.06 and I can access my xbmc_video database just fine. It is my xbmc_music I have problems with. The video works, I think at least, because I have it set to be the "first database created"; I built xbmc_music in mySQL.

 

Let me know what I can provide that may assist in any troubleshooting. This is my first help request, and I have everything else working by searching the forum. Have thumbnails, mounts, SAB, SickBeard, CP, and at least the video part of my library working... much appreciated!

Link to comment

Yeah, the indexes are there as are the files. When doing the xbmc as the user and pass for the xbmc_music database, I get 0s across the board for Artist, Songs, and Albums. I've tried root as the user name, nothing as the password and that at least stores the information; but I think it stores it locally and not across the board, as when I try to access on different devices (I have three XBMC boxes running) the stats aren't even across the board.

 

I feel like it is a permission level thing, as well, because I recently added logo.png and clearart.png files and they weren't recognized by my XBMCLive nor Openelec boxes until I manually changed the permission levels on the files. Maybe two completely different issues, maybe not.

 

Thanks for any information, it is super appreciated! (PS: that was me that bugged you on YouTube just a little bit ago).

 

Thanks once more!

Link to comment

If you're getting zeros across the board then it sounds like xbmc/xbmc (the database user) doesn't have permissions to write to xbmc_music.  If you don't have a problem starting from a fresh music database, I would suggest removing the music source from XBMC first.  Then from unRAID:

/usr/bin/mysql -p

 

Then we'll delete the database

mysql> drop xbmc_music;

 

Re-permission xbmc/xbmc

mysql> grant all on *.* to 'xbmc';

 

Let's confirm

mysql> select host,user from mysql.user;

 

Okay, I don't actually know what to look for with the line above, but here's my output as a reference.  I guess the row with % and xbmc is significant.

+--------------+------+
| host         | user |
+--------------+------+
| %            | root |
| %            | xbmc |
| 127.0.0.1    | root |
| localhost    |      |
| localhost    | root |
| tower        |      |
| tower        | root |
+--------------+------+

 

Honestly, you don't even need to recreate the db by hand.  At this point, fire up XBMC and add your music source.  If xmbc/xbmc has the correct permissions, it will create xmbc_music automatically.  Once it's done scraping your music, fire up the unraid terminal again.

/usr/bin/mysql -p

 

Then we'll see if the db is populated.

mysql> use xbmc_music;
mysql> select * from path;

 

Here's the partial output from my db.

+--------+----------------------------------------------------------------------------+----------------------------------+
| idPath | strPath                                                                    | strHash                          |
+--------+----------------------------------------------------------------------------+----------------------------------+
|      1 | smb://tower/Media-ReadOnly/Music/                                          | 6D671414DF87F0433A60B53D819187C0 |
|      2 | smb://tower/Media-ReadOnly/Music/3 Doors Down/                             | D1D144A72288BA802F2C4F2A3D38708E |
|      3 | smb://tower/Media-ReadOnly/Music/3 Doors Down/1999 - The Better Life/      | 983A4FB4070DD236EB9884695015A7C5 |
|      4 | smb://tower/Media-ReadOnly/Music/10,000 Maniacs/                           | FB485D2CA8F95D6DFF1B858AF8914B6D |
|      5 | smb://tower/Media-ReadOnly/Music/10,000 Maniacs/1992 - Our Time in Eden/   | AA550E389FD506EA08192E3928568200 |
|      6 | smb://tower/Media-ReadOnly/Music/10,000 Maniacs/1993 - MTV Unplugged/      | 20CC71366184CD85C3B34D3BE118A0DA |
|      7 | smb://tower/Media-ReadOnly/Music/311/                                      | 6D0C12C0BA9E9D7B4E944056F920FE9D |
|      8 | smb://tower/Media-ReadOnly/Music/311/1991 - Omaha Sessions/                | 8687F753E2F9EBE77CF2E49A4980652C |
.
.
.

 

Let us know how it went.

 

(PS: that was me that bugged you on YouTube just a little bit ago)

lol I figured ;)

 

BTW, I'm still running unRAID 4.5.6.  I hope that's not the key factor differentiating our results.

Link to comment

@funbubba, I followed all your steps and I do have the same output as you have (..well the db content is different :-))

 

However XBMC doesn't show the movies in the database view. Here is the advanced settings file in my userdata directory (I don't use music in XBMC, that's why I don't have the music database part included).

 

<advancedsettings>
   <videodatabase>
       <type>mysql</type>
       <host>192.168.178.28</host>
       <port>3306</port>
       <user>xbmc</user>
       <pass>xbmc</pass>
       <name>xbmc_video</name>
   </videodatabase> 
</advancedsettings>

 

Again, if Sequel Pro for Mac OSX is an application which shows the db content when I log into the db with the credentials you see in the advanced settings; all my movies are listened.

 

Do you have any more ideas what else I can check?

 

{Edit: I just saw that I have a user share for mysql. Might this be an issue?}

Link to comment

Hey Edgar,

 

Not sure this is related, but my db did break a couple of weeks ago.  At first it wouldn't update to with new content I know I had, then I tried to restart msqld.  It then complained that the disk that stored the db was read-only.  So okay, something went completely wrong so I rebooted the unRAID server.  After that my video library went blank.  Before blowing out the video db I decided to do a backup and noticed it was waaay smaller than previous backups (748 bytes vs 8MB).

 

So anyway, my point was, have you tried creating a new db?  You can either back it up or change advancedsettings to <name>xbmc_video_2</name> or something. Then re-add the source.  If the tables get populated, I would think you can see the library from XBMC.

 

Backup:

/usr/bin/mysqldump -u root -p xbmc_video > /path/to/backups/xbmc_video_backup

 

Restore:

/usr/bin/mysql -u root -p xbmc_video < /path/to/backups/xbmc_video_backup

Link to comment

Thanks so much for your help. I removed the database and loaded up XBMC. Looking at the log, I received this error:

 

18:04:25 T:3576 M:1463480320   ERROR: SQL: The table does not exist

                                           Query: select count(idSong) as NumSongs from songview

18:04:25 T:3576 M:1463451648   ERROR: CMusicDatabase::GetSongsCount() failed

 

How the heck can I guarantee that I have no read/write issues with this, and is there an easy thing to do on the machine to make the permissions better?

 

I have been using 5b06 for a while; it's what I started out with. Is there an easy way to use 4.7; even if I have to rebuild my parity? I'd like to give that a shot, even if it means setting a few things up once more. I love tinkering, so long as I don't lose all of my data.

 

Thanks again for the reply. As before, it's really appreciated.

Link to comment

Hmmmmmmm.  I have no clue what that means.

 

Activate: Google-fu

http://forum.xbmc.org/showthread.php?t=83283

 

There's a line in the 8th post and I have no idea what that does.  Do you want to give that a shot and report back?

 

As far as downgrading, it sounds like it's similar to upgrading.  Maybe this thread can give you some clues.

http://lime-technology.com/forum/index.php?topic=8095.0

 

I'm not the best person to ask about upgrades/downgrades, since I'm still using an older version.  I subscribe to "if it ain't broke..." especially with an OS I don't know much about.

Link to comment

funbubba, next time you are in MN I owe you a cold Wisconsin beer (c'mon, I'm from here and I know we don't make good beer).

 

Thanks a ton for your help; the thread you lead me to helped get it working. I changed the database from xbmc_music to xbmc_music2 and that did the trick (well, hopefully; it's scanning and no errors so far).

 

Thanks once more!

Link to comment

Some more news from the mysql experience.

 

I used a new XBMC build for the Mac (including VNSI TV Client) and the second time it screws my mysql database. It might have also something to do with AFP which I'm using to connect to my unRAID. I'm getting ton's of afp messages in the log....

 

I completely dropped the mysql solution as centralized database as it's not stable and reliable in my case.

 

Huge disappointment - both Timemaching and a central database for XBMC isn't working - which were both main decision drivers for a NAS implementation....

Link to comment

Try doing an automount to SMB with the folders you need on your Mac, and give it the old college try. There shouldn't be much of an honest speed difference. I never had any problems with it (and honestly I don't think I needed to "mount" my drives each time I used it on my Mac before; just loaded XBMC after the initial setup and it worked).

Link to comment

Some more news from the mysql experience.

 

I used a new XBMC build for the Mac (including VNSI TV Client) and the second time it screws my mysql database. It might have also something to do with AFP which I'm using to connect to my unRAID. I'm getting ton's of afp messages in the log....

 

I completely dropped the mysql solution as centralized database as it's not stable and reliable in my case.

 

Huge disappointment - both Timemaching and a central database for XBMC isn't working - which were both main decision drivers for a NAS implementation....

 

Don't give up!  I'm sure I'm not the only one who's gotten a Mac XBMC client to work with mysql.  Maybe some background information would be helpful.

 

1. I assume it was all working prior to connecting the particular client you mentioned above. Yes?

2. How many other XBMC clients do you have? What OS are they running and version of XBMC?

3. What steps did you take to connect this particular client?

 

I'm also curious, why AFP instead of SMB?

Link to comment
  • 2 weeks later...

Hi,

 

I've been using your guide and its worked great.

couple of points of feedback.

 

1. its really slow to load up movies with the thumbnails stored on my NAS.  but i guess that's a given limitation of this method.

 

2. why not use pathsubstitution like ur guide under apple ATV2 for all other systems too?

I mean, instead of messing around with symbolic links, if you just use the advancedsettings.xml with the pathsubstitution pointing to the thumbnails on the xbmc, it should work with all installations of xbmc.  I've only tried it on windows 7 and ipad2 so far but it's worked fine.  or am i missing something?

 

Link to comment
  • 3 months later...

Well for the Thumbnails works in my setup (AppleTV2) i have to put the user e password (it is mandatory) .... like this:

 

<pathsubstitution>

<substitute>

<from>special://masterprofile/Thumbnails</from>

<to>smb://root:password@TOWER/Media/Thumbnails/</to>

</substitute>

</pathsubstitution>

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.