fido Tux's lil' helper
Joined: 16 Jul 2003 Posts: 148 Location: WSU, Pullman, WA
|
Posted: Sun May 28, 2006 8:49 am Post subject: MySQL Upgrade seems to have trashed a database |
|
|
Ok, here is the problem. It is a little strange, so if I left anything out that might be helpful, let me know.
I recently upgraded (not exactly sure when) MySQL to 4.1.19. Sometime after that one of my databases has gone haywire, even thought the other databases are working just fine. The database in particular is called 'hb'.
When I go to access a table from within mysql (like a SELECT for example), I get back:
Code: | mysql> select * from accounts;
ERROR 1016 (HY000): Can't open file: 'accounts.ibd' (errno: 1)
|
But doing a SELECT on another database works just fine. Now, if I look at the files listed in the /var/lib/mysql directory, I see folders for each database, as expected. However, in the hb folder, I see:
Code: |
# ls
DropDownItems.frm failedLogin.frm menuLinks.frm pictures.frm updates.frm
accounts.frm imageFolders.frm transactions.frm user.frm
|
whereas in another folder (a database that works), I see:
Code: |
# ls bacula
BaseFiles.MYD Client.MYD Device.MYD FileSet.MYD Job.MYD Media.MYD Path.MYD Status.MYD UnsavedFiles.MYD db.opt
BaseFiles.MYI Client.MYI Device.MYI FileSet.MYI Job.MYI Media.MYI Path.MYI Status.MYI UnsavedFiles.MYI
BaseFiles.frm Client.frm Device.frm FileSet.frm Job.frm Media.frm Path.frm Status.frm UnsavedFiles.frm
CDImages.MYD Counters.MYD File.MYD Filename.MYD JobMedia.MYD MediaType.MYD Pool.MYD Storage.MYD Version.MYD
CDImages.MYI Counters.MYI File.MYI Filename.MYI JobMedia.MYI MediaType.MYI Pool.MYI Storage.MYI Version.MYI
CDImages.frm Counters.frm File.frm Filename.frm JobMedia.frm MediaType.frm Pool.frm Storage.frm Version.frm
|
I have looked through previoud backups, and it appears that the directory has always looked this way. In other words, the .MYI and .MYD files never existsed! This is wierd to say the least, since I KNOW that it used to be working just fine. Is it possible that a change was recently made to drop support for this kind of thing (assuming that it worked in the past)?
I really DONT want to have to wipe out my entire database and start from scratch. I have had just about enough crap from mysql. If I could somehow extract my data from whatever files are needed, I can recreate the database if necessary.
Help! _________________ Amatures built the Ark, professionals built the Titanic |
|