Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MySQL Upgrade seems to have trashed a database
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fido
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2003
Posts: 148
Location: WSU, Pullman, WA

PostPosted: Sun May 28, 2006 8:49 am    Post subject: MySQL Upgrade seems to have trashed a database Reply with quote

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
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sun May 28, 2006 9:17 am    Post subject: Reply with quote

There is nothing strange about a MySQL upgrade trashing MySQL. Read the docs. There's even a page or two on the Internet regarding it. Consider rolling back to the old version.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum