<div dir="ltr">On Tue, Jul 15, 2008 at 3:33 PM, Nick Morrott <<a href="mailto:knowledgejunkie@gmail.com">knowledgejunkie@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2008/7/15 C D Waddell <<a href="mailto:cdwaddell@gmail.com">cdwaddell@gmail.com</a>>:<br>
<div><div></div><div class="Wj3C7c">> I was having an issue with my server and had to migrate to a new myth-tv<br>
> backend box. So I followed the directions at<br>
> <a href="http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7" target="_blank">http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7</a> , I installed the exact<br>
> same version of mythtv onto my new system (the latest unmasked Gentoo<br>
> version) but when I ran the commands:<br>
><br>
> $ mysql -u mythtv -pmythtv mythconverg < record.sql<br>
><br>
> and<br>
><br>
> $ mysql -u mythtv -pmythtv mythconverg < recorded.sql<br>
><br>
><br>
><br>
> I got the error:<br>
><br>
> ERROR 1136 (21S01) at line 24: Column count doesn't match value count at row<br>
> 27<br>
><br>
> I know that I could have avoided this by issuing the mysqldump -c command<br>
> for the export of the data, but this wasn't in the documentation and I<br>
> didn't think about it until after my old box was inaccessible. Is there<br>
> anything that I can do to get these two tables into my new system? Is there<br>
> a place I can go to look at the database schema changes to determine what<br>
> columns no longer match?<br>
<br>
</div></div>The best place is your database, either via the mysql command line or<br>
using an interface such as phpMyAdmin.<br>
<br>
If using the mysql command line (update user for correct mysql username):<br>
<br>
$ mysql -u mythtv -p mythconverg<br>
<enter password><br>
<br>
mysql> describe record;<br>
mysql> describe recorded;<br>
<br>
will show the current fields in those tables. Compare those to the<br>
insert/replace fields in your two export files and you'll be able to<br>
spot which field is missing.<br>
<br>
To monitor updates to the DB schema over time, check<br>
<a href="http://cvs.mythtv.org/trac/log/branches/release-0-21-fixes/mythtv/libs/libmythtv/dbcheck.cpp" target="_blank">http://cvs.mythtv.org/trac/log/branches/release-0-21-fixes/mythtv/libs/libmythtv/dbcheck.cpp</a><br>
(replace brnaches/release-0-21-fixes/ with /trunk if running trunk)<br>
<br>
Finally, recent versions of MythTV keep a backup of the DB before<br>
upgrading to a new version, so check your DB storage directory<br>
(default to recordings directory if not configured) for a recent<br>
backup, which may be usable. If you do replace your current DB with<br>
the backup, MythTV should be able to upgrade to the current schema<br>
without any issues.<br>
<br>
Nick<br>
<br>
--<br>
Nick Morrott<br>
<br>
MythTV Official wiki:<br>
<a href="http://mythtv.org/wiki/" target="_blank">http://mythtv.org/wiki/</a><br>
MythTV users list archive:<br>
<a href="http://www.gossamer-threads.com/lists/mythtv/users" target="_blank">http://www.gossamer-threads.com/lists/mythtv/users</a><br>
<br>
"An investment in knowledge always pays the best interest." - Benjamin Franklin<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br>
</blockquote></div><br>Thanks for the DB schema link, I was able to solve my problem using this. Once I went through the schema I saw that profiles were added in .21, and remembered that I had to switch to a testing version of mythtv .21 for a short time in order to solve an incompatibility issue with my hardware and give me access to schedules direct. Since the version of mythtv that I was using was .20, the db schema was update. Thus when I tried to import my data the columns were missing. Once I removed the "profile" section from the dump, the import went smoothly. <br>
<br>Thanks,<br>CD Waddell<br>
</div>