Mysql Error 1033 Hy000 Incorrect Information In File
Contents |
10.10) had two corrupted tables, with the following errors when we tried to access their content: ERROR 1033 (HY000): /usr/sbin/mysqld: Incorrect information in file: './database/sp_account.frm' mysql error 1033 incorrect information file frm ERROR 1033 (HY000): /usr/sbin/mysqld: Incorrect information in file: './database/sp_screen.frm' Since there were
Mysqldump Got Error 1033 Incorrect Information In File When Using Lock Tables
a lot of updates on the database, restoring a backup was not an option, so we tried the standard incorrect information in file mysql recovery tools provided by MySQL: REPAIR TABLE : http://dev.mysql.com/doc/refman/5.1/en/repair-table.html InnoDB recovery : http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html Unfortunately, these two procedures ended up with no successful results 🙁 So we dug more on the Internet, and
Mysql Incorrect Information In File Frm Innodb
we found this very interesting article : http://blogs.skysql.com/2011/05/innodb-data-recovery-success-story.html In this article, the authors refers to the Percona InnoDB Data Recovery Tool which allows recovering lost data by extracting rows from MySQL raw files. We strictly followed the documentation, and finally managed to recover our data in order to restore them in our corrupted tables. Here are the steps that we followed. First, we downloaded the source error 1033 hy000 incorrect information in file mysql tables_priv frm code of the tool onto our MySQL server; then, we built it (the doc is self explanatory). The next step consists of extracting the pages using this command: page_parser -5 -f /var/lib/mysql/ibdata1 It creates a directory which contains several subdirectories with a lot of files (in our case "pages-1328713071/FIL_PAGE_INDEX/"). Then, the tricky part is to enable the InnoDB Tablespace Monitor by using this MySQL command: CREATE TABLE innodb_table_monitor (id int) ENGINE=InnoDB; With this monitor enabled, we had to look at the MySQL error log (/var/log/mysql/error.log) in order to locate the page index of our corrupted table: TABLE: name database/sp_account, id 0 85, columns 23, indexes 2, appr.rows 220 ... INDEX: name PRIMARY, id 0 215, fields 1/22, uniq 1, type 3 root page 401, appr.key vals 220, leaf pages 3, size pages 4 ... In this output, it shows that we have to look at the page located in the 0-215 subdirectory of our extracted pages (ie pages-1328713071/FIL_PAGE_INDEX/0-215/). Then, we had to merge the pages files into one: find pages-1328713071/FIL_PAGE_INDEX/0-215/ -type f -name '*.page' | sort -n | xargs cat > merge
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
Error 1033 Hy000 Incorrect Information In File Mysql Proc Frm
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Mysql Repair Database
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to recover a MySQL database: Incorrect information in file: './xxx.frm' [closed] up vote 5 down vote favorite 1 A very important database has gone corrupt that was sitting https://www.ekito.fr/people/repairing-a-badly-hurt-mysql-database-2/ on server at a shared web host, and I didn't back up. The table contains a large list of very important email addresses. I can get a table listing, but if I open any of the tables with Navicat or phpMyAdmin, I get the following error: Incorrect information in file: './the-table-name.frm' I was able to get a hold of the .frm files associated with the database from the web host. There is other data in there, but if http://stackoverflow.com/questions/2314249/how-to-recover-a-mysql-database-incorrect-information-in-file-xxx-frm I could at least get the email addresses, I would be alright. How do I recover this database? I would be willing to pay somebody to fix this. mysql disaster-recovery share|improve this question edited Feb 22 '10 at 21:31 hobodave 19.3k25666 asked Feb 22 '10 at 21:14 Wolverine 1,03131318 closed as off topic by Justin, JB King, bmargulies, svick, Justin Ethier Sep 8 '11 at 0:10 Questions on Stack Overflow are expected to relate to programming within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 3 Answers 3 active oldest votes up vote 11 down vote This belongs on serverfault. First, .FRM files contain none of your "data". They are simply the definition of the table. If all of the following are true: The table is using the MyISAM storage engine You know the CREATE TABLE statement required to recreate the table Then, do the following: Stop MySQL Backup your table_name.frm, table_name.MYI, table_name.MYD files Delete them from your mysql data directory (/var/lib/mysql usually) Start MySQL CREATE the table again Stop MySQL Copy the .MYD and .MYI files back into the datadir, replacing the ones t
same SQL layer. In practice the application and/or database designer can choose from a variety of low level data storage implementations that each offer different characteristics and may be chosen on a per table basis. (Even though I personally believe most designs will use one type of table http://www.danielschneller.com/2007/09/error-1033-hy000-on-innodb.html for all tables of a particular schema). The idea behind this is that for example people who do not need transactions should not have to worry about them at all - maybe there is a performance impact involved which they cannot afford to take. Moreover some specialized types of index or column might not be available on all engines. Basically the concept is very interesting and can be really useful for developers. However there is a weakness that in my opinion needs some severe work incorrect information to be done: The interface between the common SQL layer and the storage engines seems to be somewhat limited with respect to what storage engines can do to inform the level above about status and error conditions. For example there is no (elegant) way to find out about the details of a constraint violation problem when using the InnoDB storage engine. While you will get an error message that some statement failed due to a violation of referential integrity constraints, you have to use the incorrect information in generic "show engine innodb status" command to get some details. However this will not only tell you about the error you care about at that particular moment, but will also give you lots of information on lots of other stuff inside InnoDB. This is however necessary, because you do not have any other means of find out out about those - e. g. when you are investigating a performance problem. From what I learned from a consultant some time ago this is due to the limit interface specification through with MySQL itself (the upper layer) and the storage engines talk to each other. Because this protocol has to be somewhat generic messages from the bottom to the upper levels have to be somehow wrapped into some form of special result set which you then have to parse and understand on your own. Moreover if memory serves me right, there is a limitation on how much data can be transferred at a time (could be a limitation of the client as well). Because of this you will not even always get a full InnoDB status output, because it will be truncated if it gets bigger than 64k. While this is not particularly nice it is a limitation I believe is acceptable, especially in the case of InnoDB, because the innodb_monitor feature allows you to get the full output into a log file. What I consider much worse however, is that error messages from the underlying storage engine are often mapped to more generic MySQL me