[mythtv-users] Mythtv Migration
Nick Morrott
knowledgejunkie at gmail.com
Tue Jul 15 19:33:42 UTC 2008
2008/7/15 C D Waddell <cdwaddell at gmail.com>:
> I was having an issue with my server and had to migrate to a new myth-tv
> backend box. So I followed the directions at
> http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 , I installed the exact
> same version of mythtv onto my new system (the latest unmasked Gentoo
> version) but when I ran the commands:
>
> $ mysql -u mythtv -pmythtv mythconverg < record.sql
>
> and
>
> $ mysql -u mythtv -pmythtv mythconverg < recorded.sql
>
>
>
> I got the error:
>
> ERROR 1136 (21S01) at line 24: Column count doesn't match value count at row
> 27
>
> I know that I could have avoided this by issuing the mysqldump -c command
> for the export of the data, but this wasn't in the documentation and I
> didn't think about it until after my old box was inaccessible. Is there
> anything that I can do to get these two tables into my new system? Is there
> a place I can go to look at the database schema changes to determine what
> columns no longer match?
The best place is your database, either via the mysql command line or
using an interface such as phpMyAdmin.
If using the mysql command line (update user for correct mysql username):
$ mysql -u mythtv -p mythconverg
<enter password>
mysql> describe record;
mysql> describe recorded;
will show the current fields in those tables. Compare those to the
insert/replace fields in your two export files and you'll be able to
spot which field is missing.
To monitor updates to the DB schema over time, check
http://cvs.mythtv.org/trac/log/branches/release-0-21-fixes/mythtv/libs/libmythtv/dbcheck.cpp
(replace brnaches/release-0-21-fixes/ with /trunk if running trunk)
Finally, recent versions of MythTV keep a backup of the DB before
upgrading to a new version, so check your DB storage directory
(default to recordings directory if not configured) for a recent
backup, which may be usable. If you do replace your current DB with
the backup, MythTV should be able to upgrade to the current schema
without any issues.
Nick
--
Nick Morrott
MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users
"An investment in knowledge always pays the best interest." - Benjamin Franklin
More information about the mythtv-users
mailing list