XBMC MySQL Library
#61
If this is valid to this conversation, I apologize in advance and will be happy to start a new thread if desired...

I just installed Frodo over Eden on my test laptop and it is unable to convert my existing Eden database. I then tried a fresh install of Frodo, deleted the xbmc_music32 and xbmc_video75 db's from MySQL with the thought of just creating a new db. No luck. I am still getting the same error.

My log is here: http://pastebin.com/nNqPpBdt
My advancedsettings.xml is here: http://pastebin.com/0sg7Vz5Q

and my SQL looks like this:
Code:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| greyhole           |
| hda_production     |
| monitorix          |
| mysql              |
| phpmyadmin         |
| test               |
| xbmc_music18       |
| xbmc_video60       |
| xbmc_video63       |
+--------------------+
10 rows in set (0.00 sec)

mysql>

My test laptop was running Eden. My main HTPC is running Eden (and ultimately what I would like to upgrade). I also have 2 AppleTV's on Crystalbuntu. All point to a Fedora 14 based server.

If there is any additional information I can provide, anything to test, etc. please let me know. I will be more than happy to provide whatever needed to get this going! (And maybe help the devs in the process??)
The XBMC team, plug-in devs, skinners, etc. do this for us for FREE in their spare time because they want to. Think about that for a second before you start bitching...
Reply
#62
Does the XBMC MySQL user have access to create new databases?
Reply
#63
Sure didn't. Thanks Ned.

Code:
GRANT ALL PRIVILEGES ON *.* TO 'xbmc';
The XBMC team, plug-in devs, skinners, etc. do this for us for FREE in their spare time because they want to. Think about that for a second before you start bitching...
Reply
#64
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?
Reply
#65
(2013-03-20, 22:56)fernicus Wrote: 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?

MySQL Workbench.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#66
Are there any additional details anywhere around the proper grant/access settings needed to get things going for MySQL? The wiki seems to say that doing restricted permissions will cause problems, but doesn't provide info on what the issue actually is (e.g., doing a grant all just to the XBMC tables). Since I'm using the MySQL server I already use for other things, I'd like to keep things as secure/segmented as possible.
Reply
#67
It will only be an issue when you upgrade to a new version of XBMC, as it will then want to create a new database.
Reply
#68
For those that want a more restrictive MySQL policy this is the process that I took that worked for me.

# Log into MySQL command line tool
create user 'xbmc'@'192.168.0.%' identified by 'xbmc';

# Grant the restricted permissions. This will work for all profiles and versions of the database
grant all on `%MyVideos%`.* to 'xbmc'@'192.168.0.%';
grant all on `%MyMusic%`.* to 'xbmc'@'192.168.0.%';
flush privileges;

# Verify user creation and specific permissions
# Notice all the N values for the global permissions and all the Y values for the specific database permissions
# Using %MyVideos% and %MyMusic% allows for individual profile databases to be created and different DB versions
use mysql;
select * from user;
| 192.168.0.% | xbmc | <HASHED_PASSWORD_HERE> | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 |
select * from db;
| 192.168.0.% | %MyVideos% | xbmc | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
| 192.168.0.% | %MyMusic% | xbmc | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |

# Grant global permissions to allow for the *view tables to be created
grant all on *.* to 'xbmc'@'192.168.0.%';
flush privileges;

# Verify all the provileges are correct
show grants for 'xbmc'@'192.168.0.%';
+--------------------------------------------------------------------------------------------------------------------------+
| Grants for [email protected].% |
+--------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'192.168.0.%' IDENTIFIED BY PASSWORD '<HASHED_PASSWORD_HERE>' |
| GRANT ALL PRIVILEGES ON `%MyVideos%`.* TO 'xbmc'@'192.168.0.%' |
| GRANT ALL PRIVILEGES ON `%MyMusic%`.* TO 'xbmc'@'192.168.0.%' |
+--------------------------------------------------------------------------------------------------------------------------+

# Start up XBMC and have it create the data base and all the proper tables
# Shut down XBMC

# Verify correct tables have been created
use MyVideos75;
# Look for the following tables: episodeview, movieview, musicvideoview and tvshowview
# If you see these then you can proceed to remove the global permissions
show tables;

# Remove global permissions
revoke all privileges on *.* from 'xbmc'@'192.168.0.%'

# Verify global permissions are revoked. Look for the GRANT USAGE instead of GRANT ALL PRIVILEGES for the global
# entry
show grants for 'xbmc'@'192.168.0.%';

+-----------------------------------------------------------------------------------------------------------------+
| Grants for [email protected].% |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xbmc'@'192.168.200.%' IDENTIFIED BY PASSWORD '<HASHED_PASSWORD_HERE>' |
| GRANT ALL PRIVILEGES ON `%MyVideos%`.* TO 'xbmc'@'192.168.200.%' |
| GRANT ALL PRIVILEGES ON `%MyMusic%`.* TO 'xbmc'@'192.168.200.%' |
+-----------------------------------------------------------------------------------------------------------------+


# You will need to restore global privileges if you add new profiles until the new proflie database is created
# You will also need to restore global privileges when upgrading to a new version of XBMC in case there is a DB change
# After the additional profile databases are created or XBMC is updated, you can again revoke global permissions
Reply
#69
(2013-03-20, 22:56)fernicus Wrote: 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?

In a windows environment, you can download a free program called " HeidiSQL "

http://www.heidisql.com/

Great ability to look into MySQL.

I even use it to change the contents of my .NFO files.

here is a screenshot from their web page...

Image

Of course, you would see your databases, and drilling down, youcould see the contents.

I use multiple profiles, and see all the databases for all profiles there.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC MySQL Library0