Corrupted innodb table crashing mysql instance how to recover table?

  • Hello,

    Running a simple query against corrupted innodb table is crashing mysql instance .

    table test.xyz got corrupt during crash and truncate table command was in progressing when mysql crash , now

    running a simple select * query is also crashing db .

    mysql> use test;

    Database changed

    mysql> select * from xyz;

    ERROR 2013 (HY000): Lost connection to MySQL server during query

    mysql>

    mysql>

    mysql> select * from xzy;

    ERROR 2006 (HY000): MySQL server has gone away

    No connection. Trying to reconnect...

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    ERROR:

    Can't connect to the server

    Error Log :

    [ERROR] Build InnoDB index translation table for Table ./test/xyz failed

    [ERROR] Table ./test/xyz has no primary key in InnoDB data dictionary, but has one in MySQL! If you created the table with a MySQL version < 3.23.54 and did not define a primary key, but defined a unique key with all non-NULL columns, then MySQL internally treats that key as the primary key. You can fix this error by dump + DROP + CREATE + reimport of the table.

    [Warning] Table ../test/xyz key_used_on_scan is 0 even though there is no primary key inside InnoDB.

    [ERROR] Innodb could not find key n 0 with name PRIMARY from dict cache for table test.xyz

    Any suggestion on how to recreate table will be highly appreciated .

  • This is a Microsoft SQL Server forum, we're not in general MySQL people here. Maybe try asking this over at http://forums.mysql.com/?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Some info here on an (oddly identical) post from 18 months ago...

    http://www.percona.com/forums/questions-discussions/mysql-and-percona-server/11217-corrupted-innodb-table-crashing-mysql-instance-how-to-recover-table

    If the table was being truncated and there's no FK's referencing the table, could you not just issue drop table & create table statements to get to where you need to be?

    NB: There's identical posts on SO for today too.

  • Try to restore by means of the tool:

    MySql Recovery Toolbox and find out how you can use the corrupt MySQL recovery tool for damaged database restoration and easily repair known issues or already known problems, occurred in MySql files. This MySql repair utility offers many benefits like:

    Supports all MySql file versions and parses even very large documents on older PC computers;

    Supports primary and external keys, tables, views, indexes and other objects;

    Allows previewing recovered data in freeware mode so you can get results without purchasing MySql Recovery Toolbox

    For more information: http://www.mysqlrecoverytoolbox.com/[/url]

    As you can look for the answer here: http://www.filerepairforum.com/forum/databases/databases-aa/mysql/197-corrupted-innodb-table-crashing-mysql-instance-how-to-recover-table

  • while you are working on your SQL file you might encounter an ERROR 2006 (HY000): MySQL server has gone away. When I received this error, I tried various ways, then at last with the help of MySQL Repair Tool. It helped me in fixing the corrupted InnoDB database. Moreover this software is very user friendly.

  • while you are working on your SQL file you might encounter an ERROR 2006 (HY000): MySQL server has gone away. When I received this error, I tried various ways, then at last with the help of MySQL repair Tool. It helped me in fixing the corrupted InnoDB database. Moreover this software is very user friendly.

  • Restore corrupt or damaged MY SQL database by using its backup, through this way you can repair any types of error. Or there are lots of other manual methods and repairing tricks available that can help you to fix MYSQL errors.

    For more information visit: http://mysql.filerepairtool.net/blog/[/url]

  • jackadision (11/12/2016)


    Restore corrupt or damaged MY SQL database by using its backup, through this way you can repair any types of error. Or use a third party MY SQL Repair Tool, this can restore MY SQL database without need of backup file.

    For more information visit: http://mysql.filerepairtool.net/blog/[/url]

    Strongly suggest you stop this kind of spamming jackadision, chances of anyone reading such an old post are slim to none and less tolerant members will report your posting as a spam hence getting you barred from the forums.

    😎

  • Dear sir,

    According to me this is not a spam post, post contains links are always not spam. The link given by me in my previous post contains lots of blogs on MYSQL related issues and are very helpful.

    Thanks

  • jackadision (11/12/2016)


    Dear sir,

    According to me this is not a spam post, post contains links are always not spam. The link given by me in my previous post contains lots of blogs on MYSQL related issues and are very helpful.

    Thanks

    Just trying to be helpful, this is the second post I've seen from you and in both instances you are promoting links to repair tools.

    😎

  • Eirikur Eiriksson (11/12/2016)


    jackadision (11/12/2016)


    Dear sir,

    According to me this is not a spam post, post contains links are always not spam. The link given by me in my previous post contains lots of blogs on MYSQL related issues and are very helpful.

    Thanks

    Just trying to be helpful, this is the second post I've seen from you and in both instances you are promoting links to repair tools.

    😎

    Done, thanks for your advice.

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic. Login to reply