473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Incorrect Information in File == MySQL Table Corrupted?

Hi Experts,

I encountered the following problem when I'm trying to open SOME tables in MySQL database:
"Incorrect information in file ./[database name]/[table name].frm"

Other tables within the same database can be opened without any issues, only some tables have this problem. And this is not just happening in one database, but the other database on the same server also has this problem (there are 2 databases AFAIK on this server). Not sure if anyone else is using this server. The database is InnoDB, running on Win2k3. Are there any other information that is required that I didn't provide?

I have read through posts in mysql forum and it seems like none of them is able to solve my problem. The database used to work since being deployed 2 years ago and the last time the my.ini is amended is 2 years ago.

It sounded like a data corruption issue to me and the only way is to perform data restoration from the last known working state. However, is there something wrong somewhere that I can check and fix without needing to do a restoration of the database? The users are dead against it as it would mean loss of data since the date of restoration.

Thanks!
May 5 '15 #1

✓ answered by elliottkerr

1. Edit my.cnf (usually located in /etc/my.cnf) and add this line into [mysqld] section
innodb_force_recovery=4
2. Restart mysql (e.g: /etc/init.d/mysqld restart)
3. Your MySQL log should tell you which table is corrupt. You can dump the table using “SELECT … INTO OUTFILE …” from mysql console or using tool like mysqldump
o Example using MySQL query (you also need to dump the schema later)
mysql> SELECT * FROM corrupted_table INTO OUTFILE ‘/path/to/file’
o Example using mysqldump
root# mysqldump –opt -u uname -p dbname corrupted_tablename > /path/to/out.sql
4. Go back to my.cnf and comment the line you wrote from step #1
5. Go intoMySQL console and drop the corrupted table
mysql> DROP TABLE corrupted_tablename;
6. Import data dump, for sql dump you can use:
root# mysql -u uname -p < /path/to/out.sql
7. Go back into mysql console, check and optimize all tables
8. Done
9. As last variant visit http://www.filerepairforum.com/forum...came-corrupted

1 2726
1. Edit my.cnf (usually located in /etc/my.cnf) and add this line into [mysqld] section
innodb_force_recovery=4
2. Restart mysql (e.g: /etc/init.d/mysqld restart)
3. Your MySQL log should tell you which table is corrupt. You can dump the table using “SELECT … INTO OUTFILE …” from mysql console or using tool like mysqldump
o Example using MySQL query (you also need to dump the schema later)
mysql> SELECT * FROM corrupted_table INTO OUTFILE ‘/path/to/file’
o Example using mysqldump
root# mysqldump –opt -u uname -p dbname corrupted_tablename > /path/to/out.sql
4. Go back to my.cnf and comment the line you wrote from step #1
5. Go intoMySQL console and drop the corrupted table
mysql> DROP TABLE corrupted_tablename;
6. Import data dump, for sql dump you can use:
root# mysql -u uname -p < /path/to/out.sql
7. Go back into mysql console, check and optimize all tables
8. Done
9. As last variant visit http://www.filerepairforum.com/forum...came-corrupted
May 8 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: steve | last post by:
I have an on-going problem that my ".MYI" mysql files get corrupted. I have written php trapping routine to report on the problem to admin. My next step is to initiate "repair table" right after...
0
by: Google Mike | last post by:
This has been discussed before back in 2002, and then in Feb of 2003 when I did a search on Google Groups for MySQL Table Sizes. Back then, people said go here: ...
0
by: Jean-Luc Fontaine | last post by:
Here is what I did: - I had a perfectly working compressed table: ccc in database ddd - uncompressed it: # myisamchk -u history200310 - recovering (with sort) MyISAM-table 'ccc' Data records:...
10
by: eholz1 | last post by:
Hello Members, I am setting up a photo website. I have decided to use PHP and MySQL. I can load jpeg files into the table (medium blob, or even longtext) and get the image(s) to display without...
3
by: JAYO | last post by:
The MySQL table is located in a Linux Server OS, so I need the information from that table for updating Paradox tables in Windows OS. If a PHP program in the Linux Server can save a file with the...
2
by: holdingbe | last post by:
Hi, I haven’t select data from any table in mysql database. While I selected the data I got ERROR 1033 (HY000): Incorrect information in file error. I have not changed any...
3
by: Marjeta | last post by:
I have installed MySQL 5.0.67 yesterday. Previously we were using 4.0. On the development server, testing server, and training server this upgrade went smooth. The only thing I did there was run...
0
by: anil2083 | last post by:
Hello, I am getting this exception when i am trying to login JDBCExceptionReporter:Incorrect key file for table '/tmp/#sql_6caf_0.MYI'; try to repair it . I am unable to understand how to...
3
by: xaverkahl | last post by:
Hello Experts, I had a issue with a MYSQL Table. Here's my scenario. CentOS Linux 6.4 MySQL version 5.1.69 When trying to run a script to update some tables the Mysql shows a warning at the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.