Mythweb failure, deleted mythweb_sessions table

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
dmbgo
Junior
Posts: 17
Joined: Thu Mar 26, 2020 3:25 am
Australia

Mythweb failure, deleted mythweb_sessions table

Post by dmbgo »

Hi,
My mythweb wasn't working on a new install, so I googled the problem and found what I thought was a solution.
The solution was as follows:
1/ Delete the mythweb_sessions table (which worked)

2/ Recreate the mythweb_sessions table by issuing the following command:

mysql> CREATE TABLE mythweb_sessions ( id VARCHAR(128) PRIMARY KEY NOT NULL DEFAULT '', modified TIMESTAMP, data BLOB NOT NULL DEFAULT '', INDEX (modified);

This did not work and gave me the following error:

ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'data' can't have a default value

I think I have now deleted my mythweb_sessions table from the mythconverg database, so I need some kind person to help me with the mysql command to recreate the table.
Regards
David Maher
dseven
Newcomer
Posts: 7
Joined: Thu Mar 26, 2020 11:11 pm
United States of America

Re: Mythweb failure, deleted mythweb_sessions table

Post by dseven »

Surely you made a backup of your database before doing this :)

Here's what a recent backup of mine includes:

Code: Select all

DROP TABLE IF EXISTS `mythweb_sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mythweb_sessions` (
  `id` varchar(128) NOT NULL DEFAULT '',
  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `data` blob NOT NULL,
  PRIMARY KEY (`id`),
  KEY `modified` (`modified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb failure, deleted mythweb_sessions table

Post by bill6502 »

A simpler way would be to change the WebDBSchemaVer setting to 0. That will fool
mythweb into thinking that a schema change is required and the 1st step is to DROP
and CREATE the table.

@ dmbgo, can you provide a link to the incorrect SQL? That query is from 2009.
If it's in the MythTV Wiki, I'll fix it.
Post Reply