SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Corrupted innodb table crashing mysql instance how to recover table?


Corrupted innodb table crashing mysql instance how to recover table?

Author
Message
WilliamRams
WilliamRams
SSC Journeyman
SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)

Group: General Forum Members
Points: 85 Visits: 1
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 .
GilaMonster
GilaMonster
SSC Guru
SSC Guru (674K reputation)SSC Guru (674K reputation)SSC Guru (674K reputation)SSC Guru (674K reputation)SSC Guru (674K reputation)SSC Guru (674K reputation)SSC Guru (674K reputation)SSC Guru (674K reputation)

Group: General Forum Members
Points: 674871 Visits: 48433
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


Gazareth
Gazareth
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19224 Visits: 6147
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.
derick.s
derick.s
SSC-Enthusiastic
SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)

Group: General Forum Members
Points: 113 Visits: 0
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/

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
jack adision
jack adision
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 13
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/

http://pcerror-fix.com
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)

Group: General Forum Members
Points: 115474 Visits: 21466
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/


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.
Cool
jack adision
jack adision
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 13
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

http://pcerror-fix.com
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)

Group: General Forum Members
Points: 115474 Visits: 21466
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.
Cool
jack adision
jack adision
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 13
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.
Cool


Done, thanks for your advice.

http://pcerror-fix.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search