Possible to restore a deleted table from mptvdb? (1 Viewer)

Holzi

Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Hello!
    I 'accidently' deleted a table from mptvdb (MySQL). Is it possible to restore it (without content) or does there only help a complete reinstall of MediaPortal and/or MySQL?

    Thanks! :)
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Ooops! :p

    Yeah, it is possible to restore without content. If you tell me the table name, I can supply the SQL to run to recreate it.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Here's the SQL:

    CREATE TABLE `program` (
    `idProgram` int(11) NOT NULL AUTO_INCREMENT,
    `idChannel` int(11) NOT NULL,
    `startTime` datetime NOT NULL,
    `endTime` datetime NOT NULL,
    `title` varchar(2000) NOT NULL,
    `description` text NOT NULL,
    `seriesNum` varchar(200) NOT NULL,
    `episodeNum` varchar(200) NOT NULL,
    `genre` varchar(200) NOT NULL,
    `originalAirDate` datetime NOT NULL,
    `classification` varchar(200) NOT NULL,
    `starRating` int(11) NOT NULL,
    `parentalRating` int(11) NOT NULL,
    `episodeName` text NOT NULL,
    `episodePart` text NOT NULL,
    `state` int(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (`idProgram`),
    UNIQUE KEY `idProgramBeginEnd` (`idChannel`,`startTime`,`endTime`),
    KEY `IDX_Program_State` (`state`)
    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC$$
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #5
    Here's the SQL:

    Tried that with the workbench and command line but both times there seems to be a syntax error. I am on MySQL 5.6. Thanks!

    Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DYNAMIC$$' at line 21

    1.jpg
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Sorry for the delayed response - cooking.

    Try removing the "row_format..." part. It isn't important.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #7
    Sorry for the delayed response

    No problem. :)
    The program.ibd gets created (even with the row_format part) but it is missing the .frm file. And I cant see the table in the MySQL workbench. I think I will give up for today. ;)
     

    Users who are viewing this thread

    Similar threads

    I did a check of MP 1.36 x64 on Win11 and I can confirm, that the TV server correctly detects running MediaPortal.exe process.
    I did a check of MP 1.36 x64 on Win11 and I can confirm, that the TV server correctly detects running MediaPortal.exe process.
    Hi, I am using MP in a client-only setup including DVB-S card for over 10 years now. And regularily scheduling records waking up...
    Replies
    9
    Views
    938
    Hi, I didn't have SQL problems but just wanted to agree that on my Win7 system, a clean install of 1.36 TV server x86 does not work since it won't start the TV server configuration. Installing 1.33 first and upgrading to1.36 fixed the problem. Eggert
    Hi, I didn't have SQL problems but just wanted to agree that on my Win7 system, a clean install of 1.36 TV server x86 does not...
    Hi, went from a 1.29 install (working, reinstalled for other reasons) on a fairly fresh and fully updated Windows 10 system for a...
    Replies
    26
    Views
    4K
    MP1 MP2 Reset TVServer DE
    It seems if you uninstall just the tvserver and client it wipes all the settings and clears the database.
    It seems if you uninstall just the tvserver and client it wipes all the settings and clears the database.
    Is there a way to reset the tvserver back to default without affecting the rest of mediaportal? DVBIP has stopped scanning since I...
    Replies
    4
    Views
    700
    I removed all sign of MySQL, rebooted, did a clean reinstall. It reinstalled 5.6, But I've still got both the same problem - unable to connect to any of the specified MySQL hosts. And Hostname is still in red. I don't understand - this is a dedicated TV computer. Unless an update did this I don't know why there's a problem in the...
    I removed all sign of MySQL, rebooted, did a clean reinstall. It reinstalled 5.6, But I've still got both the same problem -...
    I've been using MediaPortal for 20 or so years. Last night it recorded perfectly. This arvo it doesn't - will run videos but not...
    Replies
    2
    Views
    1K
    Mistake
    Mistake
    I've been using MediaPortal for 20 or so years. Last night it recorded perfectly. This arvo it doesn't - will run videos but not...
    Replies
    26
    Views
    5K
    Top Bottom