Unable to upgrade database (1 Viewer)

porky996t

MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Not gone smoothly for me :(

    When I tried to upgrade all seemed OK except for a dialog box popping up saying "unable to upgrade database".

    Tried a fresh install and the same happened.

    I now get the "setup database connection" box popping up. I'm using MySQL, the settings look OK, but it doesn't seem to recognise the hostname now.

    Unable to access TV server config - just keeps throwing up the "unable to upgrade database" box.


    :oops: What have I done.... :oops:
     

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Sorry mm... I got carried away reading a thread about a similar problem way back on 1.1 RC1... didn't solve it though :(

    Please find attached log.rar

    Many thanks in advance.



    M.

    EDIT - just checked TVLog and found this...

    2011-08-30 14:54:56.180850 [TVService(6)]: TV service: Started
    2011-08-30 14:55:08.770868 [SetupTv(1)]: ---- SetupTv v1.1.8.0 is starting up on Windows 7 [6.1.7600.0]
    2011-08-30 14:55:08.780868 [SetupTv(1)]: ---- check connection with database ----
    2011-08-30 14:55:09.000868 [SetupTv(1)]: SetupDatabaseForm: Added dependency for TvService - MySQL
    2011-08-30 14:55:09.000868 [SetupTv(1)]: ---- check if database needs to be updated/created ----
    2011-08-30 14:55:09.010868 [SetupTv(1)]: ---- upgrade database schema ----
    2011-08-30 14:55:09.020868 [SetupTv(1)]: Exec SQL: USE MpTvDb;ALTER TABLE SoftwareEncoder ADD COLUMN reusable bit(1) NOT NULL DEFAULT 1;INSERT INTO Setting (tag, value) VALUE ('softwareEncoderReuseLimit', '0');UPDATE Version SET versionNumber = 58;
    2011-08-30 14:55:09.020868 [SetupTv(1)]: ********* SQL statement failed! *********
    2011-08-30 14:55:09.020868 [SetupTv(1)]: ********* Error reason: Table 'mptvdb.softwareencoder' doesn't exist
    2011-08-30 14:55:09.020868 [SetupTv(1)]: ********* Error code: 1146 *********

    2011-08-30 14:55:32.241900 [TVService(6)]: TV Service: stopping
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi again

    Looks like one of the DB scripts can't execute. Do you know what version of MySQL you're running?

    The script itself is:

    Code:
    ALTER TABLE SoftwareEncoder ADD COLUMN reusable bit(1) NOT NULL DEFAULT 1;
    INSERT INTO Setting (tag, value) VALUE ('softwareEncoderReuseLimit', '0');
    UPDATE Version SET versionNumber = 58;

    The error is:

    Error reason: Table 'mptvdb.softwareencoder' doesn't exist

    Theoretically you should have that table since MP 1.2.0a. Are you able to check that using the query browser tool (or similar) for me?

    mm
     

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Cheers mm,

    Going into the realms of the dark arts here with MySQL. I couldn't tell you what version apart from MySQL Server 5.1

    I cannot seem to find much else. I have found in "ProgramData>MySQL>MySQL Server 5.1>data>mptvdb" three files which are titled "version". I suspect this is where the Query Browser comes in as they are .myd, .myi and .frm file extensions.


    Could it be easier to a "full", clean reinstall?


    M.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Going into the realms of the dark arts here with MySQL. I couldn't tell you what version apart from MySQL Server 5.1
    No worries, that is good enough. :)

    I cannot seem to find much else. I have found in "ProgramData>MySQL>MySQL Server 5.1>data>mptvdb" three files which are titled "version". I suspect this is where the Query Browser comes in as they are .myd, .myi and .frm file extensions.
    That folder contains all the database table files, and those particular 3 files are the files that hold the TV Server version table data. Query Browser is software that allows you to browse the database and execute queries. It is what I use, but I think it has been replaced with the Workbench tool in the last year or so.

    Could it be easier to a "full", clean reinstall?
    A full install would almost certainly solve it, but you'd certainly lose your database and we wouldn't have any clue about what has gone wrong - a lose-lose situation. You could potentially fix this quite easily with a little persistence. For a start, what happens if you do this:

    1. Start a commandline/terminal (XP: start -> run -> type "cmd" -> OK, Vista/7: start -> search "cmd" -> hit enter).
    2. Type mysql -u root -p MediaPortal
    3. Type use MpTvDb;
    4. Type select * from SoftwareEncoder;

    Let us know what you see at that point.

    Also, what happens if you do the following (after step 4):
    1. Type select * from Version;

    mm
     

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Just comes up on step 2 saying "mysql is not recognised as an internal or external command, operable program or batch file"


    Does it make life easier if I install mysql workbench?? I have downloaded it, so install should be easy enough (famous last words)
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Ahhh, sorry.

    Try (before step two) cd "c:\<path to MySQL install folder>\bin" where <path to MySQL install folder> is something like "Program Files\MySQL". The bin folder should have the mysql.exe file in it.

    mm
     

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    @ chris - it was 1.1.3


    @mm ... got into relevant install directory, and after step 2 I get a request of "Enter Password" - thought this could be "MediaPortal" again, it wasn't... got a message code saying ERROR1049 unknown database 'mediaportal'....


    @mm - got MySQL Workbench installed and working and can access MP SQL files (I'm using my laptop for net access, and have Workbench on the laptop and MySQL on HTPC)
     

    Users who are viewing this thread

    Top Bottom