Upgrade to Eden Beta - MYSQL question
#1
Hi All,

I am planning on upgrading to Eden on the ATV2.

I have two of these both currently talking to MYSQL database and also a windows 7 machine also talking to the MYSQL database

Could anyone tell me the correct version/procedure to update the windows 7 version to so that all 3 devices will still continue talking to the MYSQL database correctly>?

I remember from before when i was thinking of going to the nightlies it was not worth it as the ATV versions would have been out of sync with the windows version.

I imagine the database will need converting? If that is the case I would plan to update windows machine and let that sort the database out then continue with the ATV2s

Duncan
Reply
#2
It's the same on any platform. If you use nightlies on ATV2, use nightlies for Windows. If you use Eden Beta 1 on ATV2, use Eden Beta 1 on Windows.
Reply
#3
ok - i am having a lot of MYSQL issues updating to eden.

Taking the ATV2 out of the equation for the moment

I upgraded my windows 7 machine to eden with the idea to let it update the database structure then once all working there I would point the atv2 to mysql database.


however the windows machine now has issues and I have tried several things to get it working with little success.

First time after boot it could not see anything in library mode - the sources were still there and file mode worked ok.

I rebooted xbmc again and this time library mode did show for a little while but only for tv shows and no art work was shown.

I took a look at the mysql server and two new databases xmbc_video58 and xbmc_music18 had been created.

I tried changing the advancedsettings.xml so that it pointed to those databases (wasn't sure if this was what i supposed to anyway?) - anyway that didnt really work either.

Did a bit of research and dropped the new databases incase there had been an error. Removed reference to <name>xbmc_video</name> and <name>xbmc_music</name> and fired up xbmc again.

This time I got 4 x new databases xmbc_video58, xbmc_video5858 and xbmc_music18, xbmc_music1818 have been created.


So i am guess there maybe some issues with the upgrading of my database!

Would the best thing to do be to create a new database for eden to populate from scratch and then import my library backup into that? Would I have to call the database anything specific?
Reply
#4
leaving it as <name>xbmc_video</name> is fine, and it will automatically point to xbmc_video58. The xbmc_video5858 came from when you changed the advancedsettings.xml file to <name>xbmc_video58</name>, because XBMC will always add the *58 to the end.

As for why it's not working, we need an xbmc.log file with debugging turned on
Reply
#5
In case anyone else is struggling with this I just wanted to give an update as to how I have got everything working


Exisiting setup
1x windows 7 machine running Dharma
2 x atv running IOS 4.x and XBMBC Dharma

Movie files and MYSQL database running on a server



Changes to make
Upgrade all machines to EDEN Beta
Upgrade ATV2's to IOS 5.x


Requirements
Do not break anything completely or risk WW3 at home!!


Methodology

Get the PC up and running with Eden and upgrade the MYSQL database first - confirm everything working before attempting the ATV stuff

Eden should upgrade exisiting database structure without damaging the current database (creates a copy) - that way I can work on the PC side whilst my wife could still use the ATV2's

Assumptions
Your MYSQL server has the correct permissions set for user XBMC (mine did)

Problem
Installed EDEN on PC and checked removed advancedsettings.xml before running just to check everything ok. All checks out.

Re-added the advancedsetting.xml and reloaded XBMC.

XBMC took a while to boot (as expected as it was converting database) - however once loaded all was not good

There was nothing being shown in library mode - file mode ok

I rebooted just in case and this time got some library mode shown for a short period but it wasn't working properly.

I checked the MYSQL tables and two new databases had been created with "58" appended but there had clearly been an error in the conversion

Tried a couple of things as documentated above but they did not work.


Solution
What did work eventually was this

Before starting this process I had exported the working dharma library into a single file as a backup.

I dropped all the newly created "58" database that had got created in MYSQL so was just left with the original XBMC_VIDEO and XBMC_MUSIC.

I then removed advancedsettings.xml again and allowed PC version of eden to boot (this is now running outside the MYSQL setup)

I imported my DHARMA backup into the PC EDEN XBMC and once that had finished confirmed everything was working - it was! The database conversion must have completed ok this time.

I now exported the EDEN library to single file so that I had a backup of the correct EDEN format


Next I manually created two new databases/tables in mysql called "xbmc_edenvideo" and "xbmc_edenmusic"

please note that when I did this last time XBMC only liked it created with the right charset

Code:
CREATE DATABASE xbmc_edenvideo CHARACTER SET latin1 COLLATE latin1_general_ci;


I then updated my advancedsettings.xml to point at these two tables (rather than the old xbmc_video).

Starting PC XBMC this time I now have an empty libary again but this time there are two new databases correctly created called "xbmc_edenvideo58" and "xbmc_edenmusic58".


I then imported my EDEN backup and hey presto everything is working fine!!

Note: I could have just dropped the original xbmc_video and xbmc_music databases to have the same effect but I wanted to leave these in place to keep the peace at home and leave the ATV's running ok!



Finally I had to upgrade the atv's and re-jailbreak then install eden (this had its own issues which I wont go into here) and then copy over the new advancedsettings.xml (as per the pc version) to get these pointing to the new EDEN happy MYSQL database.


All is now working fine now!!
Reply
#6
Quote:I checked the MYSQL tables and two new databases had been created with "58" appended but there had clearly been an error in the conversion

Can you confirm this and/or get it reproducible? Exactly what is the problem that occurs. What (if anything) is in the debug logs? It may be that we can't do anything to fix it, but if you can get something reproducible we may at least be able to track down what is going wrong.

Cheers,
Jonathan
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
Reply
#7
from memory it had populated the tables but the various "views" had not been created

so things like episodeview and movieview were not there.

I will certainly try and re-create with debug log and give some feedback -may have a chance to do it tonight
Reply
#8
I'm getting the same problem updating from 10.1 to Eden beta 2. Looking at my xbmc.log here is what I see.

22:15:41 T:756 NOTICE: Attempting to update the database xbmc_video58 from version 42 to 58
22:15:41 T:756 ERROR: SQL: Undefined MySQL error: Code (1060)
Query: ALTER TABLE settings ADD VerticalShift float
22:15:41 T:756 ERROR: Error attempting to update the database version!
22:15:41 T:756 ERROR: Can't update the database xbmc_video58 from version 42 to 58
22:15:41 T:756 NOTICE: Old database found - updating from version 57 to 58
22:15:41 T:756 ERROR: SQL: Can't create database for copy: 'xbmc_video57' (1007)
22:15:41 T:756 ERROR: Unable to copy old database xbmc_video57 to new version xbmc_video58
22:15:41 T:756 NOTICE: Attempting to update the database xbmc_video58 from version 42 to 58
22:15:41 T:756 ERROR: SQL: Undefined MySQL error: Code (1060)




Looking at my databases I do see a 58 database created and it appears to be populated with data. Any help would be greatly appreciated. I would hate to have to dump my database and rescan.
Reply
#9
Oops I didn't realize when I did a search this thread is in the iOS section I'm running a win 7 box if that maters.
Reply
#10
to be fair i let my windows 7 machine do the conversion too.

My original thread was aimed at the IOS / windows compatability angle


if you try my method above you should be fine - i still need to try and get a debug log of the problem I had to post on here - assume we are getting the same issue though

tables created/populated but still not working right
Reply
#11
Yeah I am in the same boat none of the views are getting created on my 58 database.

I'm going through the steps now. On my first try even a blank database failed upgrade. But I'm trying again. With my backup database I can re-create the problem constantly. I'll do a search and see if I can figure out how to make the debug log.
Reply
#12
The problem you were getting before was a permission one. When updating the database it makes a copy of the old one. The copy process fails when the user doesn't have enough permissions. You need to grant a the user über rights to be sure.

Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
Reply
#13
I thought that might be the case so instead of using xbmc I changed my advanced settings file to use the admin user for mysql. Same problem. It created the 58 database and all the tables and fails before creating the views.

When I get home I'll validate my admin account can create a test view on the 58 database manually. Otherwise is there another way I can test?
Reply
#14
Just confirmed both my xbmc user and admin user can create new databases tables and views. So it doesn't appear to be a permissions problem. But the logs say failed to create database with no reason that I can tell. I turned on debug mode as well.

Here is the xbmc.log

http://dl.dropbox.com/u/7353079/xbmc.log
Reply
#15
By the looks of it it can't do the simple step of adding a column to the settings table:

Mysql execute: ALTER TABLE settings ADD VerticalShift float

Check your db and make sure it isn't already there perhaps?
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
Reply

Logout Mark Read Team Forum Stats Members Help
Upgrade to Eden Beta - MYSQL question0