XBMC MySQL Library

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
zebraitis Offline
Member+
Posts: 347
Joined: Jan 2008
Reputation: 6
Location: NorthAm
Post: #51
May I ask a question about My SQL and profiles?

The wiki ( http://wiki.xbmc.org/index.php?title=HOW...d_profiles ) is not clear on how I wish to enable this.

The current general recommendation is to NOT create a DB manually, and to allow XBMC to do so.

However...

Q: Do I need to create or define a name for a MySQL DB when using profiles?

Q: Is there a preferred naming schema to be followed for mainprofile and created profiles?


--------------------

Specifics:

(environment: running 13-May build on win7)


I have the solution working well for the main profile. XBMC has created the required MySQL DB's


THEN I created a profile "Excercise" and enabled the login screen.

I copied my advancedsettings.xml to %username%\AppData\Roaming\XBMC\userdata\profiles\exercise

What I thought that would occur when restarting XBMC with advancedsettings.xml in the profile was that XBMC would create a necessary DB for that specific profile.

On checking MySQL, what I saw was different.

Here is what I saw was:

mysql> showdatabases;
+----------------------------
| Database
+----------------------------
| information_schema
| mainprofilemusic18
| mainprofilemusic60
| mymusic20
| mysql
| myvideos64
| performance_schema
| test
+----------------------------

When I checked records, I see the following:

mysql> SELECT COUNT(*) from myvideos64.movie;
+-------------------
| COUNT(*)
+------------------
| 2329
+-------------------

mysql> SELECT COUNT(*) from mainprofilevideos64.movie;
+-------------------
| COUNT(*)
+------------------
| 0
+-------------------

And, when I check XBMC / Movies, I see the same movies in each profile (which kind of defeats the purpose of having profiles).


So... should I be using the naming convention that I saw at http://www.howtogeek.com/75535/how-to-sy...with-xbmc/ , adding the following line to the profile advancedsettings.xml ?

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>profilenameherevideo</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>profilenameheremusic</name> </musicdatabase>
</advancedsettings>


I look forward to a reply. Thanks!

Vincent
find quote
Ned Scott Offline
Team-XBMC Wiki Guy
Posts: 12,058
Joined: Jan 2011
Reputation: 135
Location: Arizona, USA
Post: #52
The name used doesn't actually matter as long as you remember that the actual MySQL DB will add a number to the end, and that number should not be added in advancedsettings.xml (otherwise it would be something like Excercise6060, etc).

You can make easy links to the XBMC wiki using double brackets around words: [[debug log]] = debug log, [[Add-on:YouTube]] = Add-on:YouTube, [[Adding videos to the library]] = Adding videos to the library, [[userdata]] = userdata, etc
find quote
zebraitis Offline
Member+
Posts: 347
Joined: Jan 2008
Reputation: 6
Location: NorthAm
Post: #53
(2012-05-19 18:51)Ned Scott Wrote:  The name used doesn't actually matter as long as you remember that the actual MySQL DB will add a number to the end, and that number should not be added in advancedsettings.xml (otherwise it would be something like Excercise6060, etc).


So... I think you are saying that I could call it "flatsquashedcat" if I so wished.


However, you are not saying IF i should add the profile name into the advancedsettings.xml

So, should the added line(s) be:


<name>flatsquashedcatvideo</name>

and...

<name>flatsquasedcatmusic</name>


which would create the DB's (with a number extension) in MySQL..... and ALSO that by naming the DB for profile use, it will prevent the main profile DB from being referenced?

Thx,

v.
find quote
zebraitis Offline
Member+
Posts: 347
Joined: Jan 2008
Reputation: 6
Location: NorthAm
Post: #54
(2012-05-19 19:28)zebraitis Wrote:  So, should the added line(s) be:

<name>flatsquashedcatvideo</name>

and...

<name>flatsquasedcatmusic</name>


which would create the DB's (with a number extension) in MySQL..... and ALSO that by naming the DB for profile use, it will prevent the main profile DB from being referenced?


Nevermind... Just tested it, and the answer is YES.

So: Rule of thumb with MySQL... IF you only have one profile, and do not name it, THEN MySQL will create a Music and Videos DB for you.

However, if you want to use PROFILES, and keep things managed well and separate, THEN you must give the DB a name in advancedsettings.xml for MySQL to create the "right" database, and for XBMC to reference that database in that profile on starting.


ONE LAST TIP: if you should happen to CHANGE the name of the default main profile in the profiles setup, then you will need to include the default database names in the advancedsettings.xml


OK... Thanks all !

v.
(This post was last modified: 2012-05-20 00:11 by zebraitis.)
find quote
LastSilmaril Offline
Junior Member
Posts: 19
Joined: May 2012
Reputation: 0
Post: #55
(2012-05-19 14:09)vicbitter Wrote:  ...

Thanks a lot vic! And all of that can be automated, too Smile Had to change the fetch line from the default (not your fault) but it looks like it's working
And yes, this was using v63. I'm assuming that the latest xbmc-rpi has been updated to 64?
(This post was last modified: 2012-05-19 23:26 by LastSilmaril.)
find quote
hefla Offline
Junior Member
Posts: 9
Joined: May 2012
Reputation: 0
Post: #56
Just a quick update on my v63 v64 issues. My openelec machine created v63 over and over again, also after updating to newest build. Had to do a fresh install (with the same build), and now it created v64 with no problems. Thumbnails works as well, but still quite slow to load. Feels like I´m on a wireless path substitution setup Smile
find quote
LastSilmaril Offline
Junior Member
Posts: 19
Joined: May 2012
Reputation: 0
Post: #57
(2012-05-20 01:29)hefla Wrote:  Just a quick update on my v63 v64 issues. My openelec machine created v63 over and over again, also after updating to newest build. Had to do a fresh install (with the same build), and now it created v64 with no problems. Thumbnails works as well, but still quite slow to load. Feels like I´m on a wireless path substitution setup Smile

I used the newest version of openelec with the newest version of xbmc-rbp and have v63 created, even though I dropped v61. I wonder if just dumping the xbmc/xbmc/video folder from frodo in will fix matters. something tells me that's the wrong way to going about a good impulse
(This post was last modified: 2012-05-22 06:07 by LastSilmaril.)
find quote
hefla Offline
Junior Member
Posts: 9
Joined: May 2012
Reputation: 0
Post: #58
Do you have a v60 from eden? That was my save... It was auto upgraded to v64 when I reinstalled new with new build.
find quote
LastSilmaril Offline
Junior Member
Posts: 19
Joined: May 2012
Reputation: 0
Post: #59
No. I'm using xbmc-rbp and had a v61, but dropping the v61 and starting from scratch with 63 didn't help; has all sorts of issues with progressive images and such. Apparently the upgrade to v64 hasn't trickled down yet to the -rbp project
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #60
And there were some known problems around v61/v62 with some mysql installs.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Post Reply