Good thought - disk space was the first thing I checked - 68% free on the root partition...not the problem.
The bad news is, I was NOT able to extract any .deb files from the big KNOPPIX file.
The good news is, I was able to connect to an archived repository from 2008 and pull the same version of the mysql-server-5.0.
The bad news is, the dpkg process did not fully complete, so I wasn't able to reinstall mysql-server-5.0.
I did finally get hold of my friend Brad to look at this with me. He was able to get mysql started and forced a rebuild of the damaged database.
He looked at the error messages and saw that the "db" table (part of the "mysql" database) was the corrupted one - not the mythtv "mythconverg" database.
Here is Brad's description of what he had to do to fix the database problems.
It was fairly easy to fix once the exact problem was understood.
I didn't cut any log or error snippets, but the key error message ended up being:
Code:
[ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format 'db'
mySQL stores data on disk organized fairly logically - /var/lib/mysql is the base directory, and sub-directories are different databases, with the file groups in those directories being individual table information (generally).
The mySQL privilege information determines what users have access to which data, and is stored in the "mysql" database in the "db" table. The confusing part was that the error was complaining about an incorrect file format ('db'), which led me to think that somehow the format of a table was changed to something inappropriate.
However, what the error actually is trying to say is "table 'db' has an incorrect file format" - in other words, it's corrupted.
So, I started the mySQL server on a separate VTTY in a mode that essentially bypassed the privilege/user mechanism (and related tables):
Code:
mysqld --skip-grant &
From there, I could start the mySQL command line console on another VTTY. Because the privilege/user mechanism had been bypassed, I checked to see that the user table was OK by manually inserting a new user.
From the mysql command line console, first
Code:
use user;
then
Code:
insert into user values('localhost','maint','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
verified that mySQL and the user table was functioning as expected.
However an error similar to the original error above appeared on the VTTY that mysqld was launched from, as well as a warning indicated on command execution within the command line interface (but no specifics).
From the command line console,
Code:
repair table db;
showed that it was damaged/corrupt, and normal repair methods weren't going to work.
Although this is generally used as a last resort, I opted to take a more blunt approach and force it to try and recreate the MYI information from the FRM file -
Code:
repair table db use_frm;
Ultimately, that is what brought some level of functionality back. Although, deleting the "db" table and restoring/recreating it would have allowed things to start again, it would likely have smashed the MythTV functionality and required a lot more forensic rebuilding than I had time or patience to do.
All is working again on the Knoppmyth R5.5 machine. In the end, it was a corrupted mysql database file! The trick was getting mysql to start up in a broken state!