[mythtv-users] Guide data until 2038

Ian Barton lists at manor-farm.org
Tue Oct 16 09:45:28 UTC 2007


Here's one way to do it:

At  shell prompt:

mysql -u mythtv -pmythtv mythconverg

Note you need to replace the mythtv in -pmyttv with the password to your 
  database. There should be no spaces between -p and your password. This 
will take you to a mysql prompt:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 101
Server version: 5.0.38-Ubuntu_0ubuntu1-log Ubuntu 7.04 distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Cut and paste the command into the buffer:

delete from program where starttime < date_sub(curdate(), interval 1 
day) or starttime > date_add(curdate(), interval 14 day);

If you get problems with word wrapping note that mysql commands should 
end with a semi colon (;);

Press Enter. Mysql will display some information about the number of 
rows updated. Enter "quit" to exit back to the shell prompt.

As always it's wise to backup the database before you start:

mysqldump -u mythtv -pmythtv mythconverg > mythconverg.sql

Ian.

>     Earlier this year, there was a post asking about a way to solve Myth 
> reporting that it had TV guide data until 2038. The solution posted was 
> to tidy the database with the following SQL script...
>  
>  delete from program where starttime < date_sub(curdate(), interval 1 
> day) or starttime > date_add(curdate(), interval 14 day);
>  
> I also have the '2038 problem' but have no idea of how to execute the 
> script supplied to the previous poster. Can anyone help with the full 
> sequence of commands so that I can correct the error in my database.


More information about the mythtv-users mailing list