after trying to migrate to 5.0.4 and now 5.0.5, I am having the same issues. That latest version I've tried migrating to is Release 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition.
Attached is my hostname.err that was cleaned out before a couple of attempts are repair, I have tried setting innodb force recovery to 1 and 4 and mysql won't stay up log enough to do anything with.
I've already restored my backup of 5.0.2, which runs without problems.
Also during the install/upgrade I run the DB integerity upgrade. During the install the only errors start with trying to migrate the wiki documents which fail b/c it can't connect to the database.
I've deleted the Hex out of the file.
EDIT :: I did backup the dir of the bad install of 5.0.5 so I can get files out of it.