[mythtv-users] cannot restore database

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Feb 21 16:30:17 UTC 2015


On Sat, 21 Feb 2015 15:31:59 +0000, you wrote:

>> # mysql -umythtv -p mythconverg -e "DROP DATABASE IF EXISTS mythconverg;"
>>>
>>>
>This command freezes forever without producing output. This is at least
>consistent with this command...
>
>mythconverg_restore.pl --drop_database --create_database --verbose
>--filename  mythconverg-1317-20150220033002.sql.gz
>
>...also freezing after saying...
>
>Preparing initial database.
>Dropping database.
>
>Even just connecting to the database manually never gives me a prompt:
>
>mysql --user=mythtv --password=XXXXX mythconverg
>
>
>...just outputs the following and locks up until I control-C:
>
>
>Reading table information for completion of table and column names
>
>You can turn off this feature to get a quicker startup with -A
>
>I got suspicious. I did
>
> sudo service mysql restart
>
>
>and, after that, this command gave me a prompt:
>
>
>mysql --user=mythtv --password=XXXXX mythconverg
>
>
>Then I tried running the original restore command:
>
>
>mythconverg_restore.pl --drop_database --create_database --verbose
>--filename  mythconverg-1317-20150220033002.sql.gz
>
>
>Again it froze at "dropping database".
>
>
>I did control-C and tried your
>
>
>mysql -umythtv -p mythconverg -e "DROP DATABASE IF EXISTS mythconverg;"
>
>
>and that also froze without output. What's stopping me from dropping the
>database? Maybe some higher-level mysql housekeeping table (e.g. one that
>says what databases are available) is also corrupted and needs repair
>before I can drop the mythconverg database?
>
>
>I confirm that mysql is running and that I can get in, with the same userid
>and password, and get a prompt.
>
>
>What now?

My guess would be that some of the internal MySQL tables that control
things are corrupt also, so you likely need to run mysqlcheck to see
what is wrong and then use its repair option if necessary.

In the worst case, it is possible to delete all the MySQL data files,
reinstall MySQL, and create a new mythconverg database from scratch.
But I have never had to do that, so I can not give detailed
instructions.  And that presumes that there are no other MySQL
databases in use - which would not be the case for me as I have
several other databases for other purposes.


More information about the mythtv-users mailing list