Win MySQL Shared database setting up problem
#1
I'm trying to setup a MySQL database following this guide http://lifehacker.com/5634515/how-to-syn...-the-house

It's probably complicated by the fact that I already have Mediaportal installed on this PC using MySQL but it shouldn't be too hard to workaround.

According to the guide, doing CREATE USER 'xbmc' IDENTIFIED BY 'xbmc'; creates the login/password pair xbmc/xbmc so the password "MediaPortal" I have to use when opening MySQL commandline must be a master password that's not important for what I'm trying to do here.

Anyway, I've created an advancedsettings.xml like so:

Code:
<advancedsettings>
   <videodatabase>
        <type>mysql</type>
        <host>127.0.0.1</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video</name>
   </videodatabase>
   <musicdatabase>
       <type>mysql</type>
       <host>127.0.0.1</host>
       <port>3306</port>
       <user>xbmc</user>
       <pass>xbmc</pass>
       <name>xbmc_music</name>
       </musicdatabase>
</advancedsettings>

and I also had to add bind=0.0.0.0 to my.ini as mysql wasn't showing as listening in Comodo firewall before.

However, both before and after changing the bind=,
SELECT host,user from mysql.user;
and
SHOW DATABASES;

returns

Code:
+-----------+------+
| host | user |
+-----------+------+
| % | root |
| % | xbmc |
| 127.0.0.1 | root |
| localhost | |
| localhost | root |
+-----------+------+
5 rows in set (0.01 sec)

+--------------------+
| Database |
+--------------------+
| information_schema |
| argustv |
| mptvdb |
| mysql |
| test |
| xbmc_music |
| xbmc_video |
+--------------------+
7 rows in set (0.02 sec)

so it looks like only root (the Mediaportal user) has access on 127.0.0.1 and localhost, whilst xbmc is only listed against % (whatever that signifies). Sure enough, I'm unable to scan content to the Library in XBMC with the advancedsettings.xml (without it, the normal XBMC database works fine).
Reply
#2
I have a similar setup to you (works a treat!), though I happened to install the other way around...

Two things:
Why don't you just let XBMC log in using the already-defined MediaPortal credentials? According to http://forum.team-mediaportal.com/thread...nk.107671/, you'd just specify 'user' and 'pass' in the XBMC AdvancedSettings XML as 'root' and 'MediaPortal' respectively...

The other thing, if you're using Frodo, I don't think you need to have the '<name>' tag in AdvancedSettings either (mine works well without it)...

Try and revert if you have any luck?
Reply
#3
Well I could try that I guess, it just seems "cleaner" to keep the two users separate.

Regarding the <name> tags, I presume it still needs the xbmc_video and xbmc_music databases setup as per the guide but you're suggesting that Frodo defaults to use those without them being specified?

http://wiki.xbmc.org/index.php?title=Adv...ttings.xml says "Not needed by default, and some users report issues when defining the this tag. When not used "MyVideos"+DB number will be used." but that's clearly not aimed at mysql databases and the mysql example underneath specifies the name.
Reply
#4
I tried changing the user/pass and that didn't work but then I removed the name tags and it's working now. I'm just not sure what database it's using!
Reply
#5
Pleasure, man.

It'll auto-create a new database on your MySQL instance, entitled MyVideos<NN>

Frodo uses a figure in the 70's for <NN>.
Reply
#6
Thanks. So it seems the guide is wrong when it tells us to create the two databases. It is dated 2010 though so not surprising it's a bit out of date!
Reply
#7
Use this: MySQL (wiki)
Reply
#8
Thanks. Even that doesn't explain how to create the user password, so does it just create the password the same as the username (i.e. xbmc/xbmc) or does it have to use the same password that was chosen when installing for all users that are subsequently created?
Reply
#9
I understand now the IDENTIFIED BY in the CREATE USER command is what sets the password, so I have xbmc/xbmc but I can still only access the database if I use root/Mediaportal. In fact, the video database stopped working after trying xbmc/xbmc, even after changing it back to root/Mediaportal but it's working again now thankfully.

I needed to start again anyway as I'd originally done it using local paths E:\Media\Movies which mean nothing on the RPi and so it told me all my movies were no longer available, so now I'm scraping using my NFS path NFS://192.168.1.64/Media/Movies.
Reply
#10
Somehow the MediaPortal part of the database has got messed up and I can't access it via the commandline with the MediaPortal password anymore, nor can I watch LiveTV or scan for channels on the PC. I guess I'll need to start from scratch with a fresh database once I find out how to do that. I'm definitely not using root/Mediaportal to login to it with Mediaportal next time!
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL Shared database setting up problem0