MySQL table key corruption problem

Lloyd Kvam python at venix.com
Thu Apr 15 13:02:44 EDT 2010


On Thu, 2010-04-15 at 10:38 -0400, Dan Coutu wrote:
> I would really rather not have to rebuild the entire openfire db from
> scratch, adding about 40 user accounts with preserved passwords and so
> forth.
> 
> Does anyone have ideas how I can fix this without losing data?

mysqldump <database> [table_one] [table_two] ... > dump.sql
        
        should preserver all of your data.  Feeding the resulting sql
        file back into mysql will rebuild the tables.  You can examine
        the dump file to make sure that it seems to be complete.  You'll
        need to block access to the database to prevent unwanted
        transactions while you do the dump and restore.  The restore
        could be done as:
        
<dump.sql mysql <database>


Could you have failed to run an upgrade script in the past?  I have dim
memories of scripts to upgrade 3 => 4 => 5.  The dump and restore will
not get around changes within the mysql (/var/lib/mysql/mysql) database
where user permissions and accounts are managed.


-- 
Lloyd Kvam
Venix Corp
DLSLUG/GNHLUG library
http://dlslug.org/library.html
http://www.librarything.com/catalog/dlslug
http://www.librarything.com/rsshtml/recent/dlslug
http://www.librarything.com/rss/recent/dlslug



More information about the gnhlug-discuss mailing list