MySQL Databse Problem
#1
I was following the tutorial on LifeHacker to get this set up as a centralized database but couldn't get it working. For some reason XBMC is unable to access the database, even on the local server. I'm running Windows Server 2008 R2. Clients are Windows 7, OS X Lion and AppleTV running XBMC.

Here is the log from the server.

Code:
16:30:29 T:2256  NOTICE: -----------------------------------------------------------------------
16:30:29 T:2256  NOTICE: Starting XBMC, Platform: Windows Server 2008 R2, 64-bit (WoW) Service Pack 1 build 7601. Built on Nov 12 2011 (Git:20111112-a2f830e, compiler 1600)
16:30:29 T:2256  NOTICE: Pentium(R) Dual-Core  CPU      E5700  @ 3.00GHz
16:30:29 T:2256  NOTICE: Desktop Resolution: 1360x768 32Bit at 60Hz
16:30:29 T:2256  NOTICE: Running with restricted rights
16:30:29 T:2256  NOTICE: Aero is disabled
16:30:29 T:2256  NOTICE: special://xbmc/ is mapped to: C:\Program Files (x86)\XBMC
16:30:29 T:2256  NOTICE: special://xbmcbin/ is mapped to: C:\Program Files (x86)\XBMC
16:30:29 T:2256  NOTICE: special://masterprofile/ is mapped to: C:\Users\Zach\AppData\Roaming\XBMC\userdata
16:30:29 T:2256  NOTICE: special://home/ is mapped to: C:\Users\Zach\AppData\Roaming\XBMC
16:30:29 T:2256  NOTICE: special://temp/ is mapped to: C:\Users\Zach\AppData\Roaming\XBMC\cache
16:30:29 T:2256  NOTICE: The executable running is: C:\Program Files (x86)\XBMC\XBMC.exe
16:30:29 T:2256  NOTICE: Log File is located: C:\Users\Zach\AppData\Roaming\XBMC\xbmc.log
16:30:29 T:2256  NOTICE: -----------------------------------------------------------------------
16:30:29 T:2256  NOTICE: Setup SDL
16:30:29 T:2256  NOTICE: Found screen: Generic PnP Monitor on Intel(R) G45/G43 Express Chipset, adapter 0.
16:30:29 T:2256  NOTICE: Primary mode: 1360x768 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 320x200 @ 70.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 320x240 @ 70.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 400x300 @ 70.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 512x384 @ 70.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 640x400 @ 70.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 640x480 @ 59.94 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 640x480 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 640x480 @ 70.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 640x480 @ 73.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 640x480 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 800x600 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 800x600 @ 72.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 800x600 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1024x768 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1024x768 @ 70.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1024x768 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1152x864 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1152x864 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x600 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x720 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x720 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x768 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x768 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x800 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x800 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x960 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x960 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1280x1024 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1360x768 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1366x768 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1400x1050 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1440x900 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1440x900 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1600x900 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1600x900 @ 75.00 - Full Screen
16:30:29 T:2256  NOTICE: Additional mode: 1600x1200 @ 60.00 - Full Screen
16:30:29 T:2256  NOTICE: load settings...
16:30:29 T:2256  NOTICE: special://profile/ is mapped to: special://masterprofile/
16:30:29 T:2256  NOTICE: loading special://masterprofile/guisettings.xml
16:30:29 T:2256  NOTICE: Getting hardware information now...
16:30:29 T:2256  NOTICE: Checking resolution 12
16:30:29 T:2256  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
16:30:29 T:2256  NOTICE: Loaded playercorefactory configuration
16:30:29 T:2256  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
16:30:29 T:2256  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
16:30:29 T:2256  NOTICE: No settings file to load to load (special://xbmc/system/advancedsettings.xml)
16:30:29 T:2256  NOTICE: Loaded settings file from special://profile/advancedsettings.xml
16:30:29 T:2256  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <videodatabase>
                                                <type>mysql</type>
                                                <host>192.168.1.2</host>
                                                <port>3306</port>
                                                <user>xbmc</user>
                                                <pass>xbmc</pass>
                                                <name>xbmc_video</name>
                                              </videodatabase>
                                              <musicdatabase>
                                                <type>mysql</type>
                                                <host>192.168.1.2</host>
                                                <port>3306</port>
                                                <user>xbmc</user>
                                                <pass>xbmc</pass>
                                                <name>xbmc_music</name>
                                              </musicdatabase>
                                            </advancedsettings>
16:30:29 T:2256 WARNING: VIDEO database configuration is experimental.
16:30:29 T:2256  NOTICE: Getting hardware information now...
16:30:29 T:2256  NOTICE: Checking resolution 12
16:30:29 T:2256  NOTICE: Default DVD Player: dvdplayer
16:30:29 T:2256  NOTICE: Default Video Player: dvdplayer
16:30:29 T:2256  NOTICE: Default Audio Player: paplayer
16:30:29 T:2256  NOTICE: Disabled debug logging due to GUI setting. Level 0.
16:30:29 T:2256  NOTICE: Log level changed to 0
16:30:29 T:2256  NOTICE: Loading media sources from special://masterprofile/sources.xml
16:30:29 T:2256  NOTICE: initializing playlistplayer
16:30:29 T:2256  NOTICE: DONE initializing playlistplayer
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video57 [1049](Unknown database 'xbmc_video57')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video56 [1049](Unknown database 'xbmc_video56')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video55 [1049](Unknown database 'xbmc_video55')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video54 [1049](Unknown database 'xbmc_video54')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video53 [1049](Unknown database 'xbmc_video53')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video52 [1049](Unknown database 'xbmc_video52')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video51 [1049](Unknown database 'xbmc_video51')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video50 [1049](Unknown database 'xbmc_video50')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video49 [1049](Unknown database 'xbmc_video49')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video48 [1049](Unknown database 'xbmc_video48')
16:30:29 T:2256   ERROR: Unable to open database: xbmc_video47 [1049]
and it just goes on.....
Reply
#2
And it goes on and on and on!

Search. There are a few threads about it. (Search for "xbmc_video57")
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#3
Yeah I see it now. Are there any nightly builds where it was still functional? Before it started trying to rename/make new databases and whatnot? Or has a better solution been proposed?
Reply
#4
There's solutions in one of the threads. You have to give it temp root access.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#5
Yeah I actually tried that command but it didn't work. My server was having various problems so I just backed it up and restored it. Going to try again soon now that I have a fresh OS to work with.
Reply
#6
darkscout Wrote:There's solutions in one of the threads. You have to give it temp root access.

Is this where you grant all on *.* to xbmc?

This did not work for me
Reply
#7
short intro ...

assumed your db is called xbmc_video in your advancedsettings.xml.

Give the mysql user all access to xbmc_video% ... (see the wildcard!) ... after that start xbmc and let it create the db for you ... it will create a db named xbmc_video57 for example ... where 57 is the db structure version (this number will change automatically from time to time on db structure updates).

So it is not needed to give the user "root" access ... just be sure that the user has enough rights for creating the xbmc DBs ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
I understand. What's the command to give user 'xbmc' the appropriate rights? Do I have to change anything in advancedsettings.xml or just leave it at the default with "xbmc_video"?
Reply
#9
Leh Sigh.

Just use 'root' user and the password you used when you set it up. (Security be damned.)

Memphiz,LOTS of people just followed a Tutorial and don't understand mysql (Heck I didn't know you could give wildcard permissions).
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#10
I have an existing myswl database and get error:

23:25:48 T:3372 ERROR: Error attempting to update the database version!
23:25:48 T:3372 ERROR: Can't update the database xbmc_video from version 42 to 56

do I need to rebuild my db from scratch?

I have run grant

GRANT ALL ON *.* TO ‘xbmc’;
Reply
#11
If anyone wants to help with our own HOW-TO for this, please do so:

http://wiki.xbmc.org/index.php?title=HOW..._libraries
Reply
#12
Yeah I will admit I don't really know anything about MySQL. I just run a Windows 2008 R2 server at my home that already hosts my whole media library to steeam to various devices and I read the LifeHacker article. It's just an outdated article and there really should be a guide with the new MySQL commands that need to be entered due to the database changes in the nightly builds.
Reply
#13
Code:
GRANT ALL ON *.* TO 'xbmc';

Why does live even bother with an xbmc user? It should just run as root. Root for everyone.

Code:
GRANT ALL PRIVILEGES ON `xbmc_video%`.* TO 'xbmc'@'%'

/Posted from my Windows 98 machine directly connected to the internet with no firew@#(*(@ ^NOCARRIER.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#14
Root works on all builds. Trust me, I was there. Now I'm all fixed.

Just read, read, read some more, put it into action, then - read some more.
Image
Maraschino - Web based HTPC Organiser. Keep track of all your web based programs all in one place.
Home Page - Repo - Bug Tracker - Support Forum.
Reply
#15
Is there any real security issue to just running it as root? I have no other databases and only run MySQL for xbmc. Im running Mysql on a 2008 server, and want to know if running it as root opens me up for any external attacks? obviously my root password will be different than any other.

Everything just works fine when i use root in the advancedsettings.xml so its the straightest path for me.
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL Databse Problem0