MySQL Forums
Forum List  »  Newbie

mysql Data Disappeared
Posted by: Matthew Swanson
Date: August 19, 2014 12:22PM

I'm going to preface this by saying mysql is not my thing. I'm pretty proficient with MSSQL, but feel like an idiot when it comes to mysql.

As of yesterday afternoon, we have a database on a legacy homegrown application that seems to have had all almost all of its data disappear. The same holds true for most tables in the database, but phpMyAdmin shows the following for the articles table:

Records: 0
Type: MyISAM
Size 1.0 KB

According to etc/my.cnf, the datadir is var/lib/mysql. Within that directory, there is a folder for the database. It contains FRM, MYD and MYI files for each of the tables. I can open the files in a text editor, and they contain the data that has disappeared. For example, the articles files (which phpMyAdmin says has 0 records and 1.0 KB):

articles.frm: 9 KB
articles.MYD: 4450 KB
articles.MYI: 2083 KB

From my understanding, the row data is stored in MYD. Since I can read the rows in that file (not very friendly, but still obviously there), I’d expect mysql to show me the same data, but it says it is empty.

I don't know if it impacts what the next steps are, but this is running mysql 4.1.22 on CentOS 4.8. I know...both are old and poorly maintained.

I have been assuming that one of my users deleted everything, but we don't have a backup strategy in place for this PC, and I don't know if this is a system glitch or user intervention. Honestly, I was hoping it would limp along for another couple weeks before we transition to a replacement…it must have known it was being replaced.

Any suggestions on what I can do to get that data back would be much appreciated!

Thanks!

Options: ReplyQuote


Subject
Written By
Posted
mysql Data Disappeared
August 19, 2014 12:22PM
August 19, 2014 12:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.