Quantcast
Channel: SQLServerCentral » SQL Server 2008 » Data Corruption (SS2K8 / SS2K8 R2) » Latest topics
Viewing all articles
Browse latest Browse all 223

Corrupted innodb table crashing mysql instance how to recover table?

$
0
0
Hello,Running a simple query against corrupted innodb table is crashing mysql instance .[code="plain"]table test.xyz got corrupt during crash and truncate table command was in progressing when mysql crash , nowrunning a simple select * query is also crashing db .mysql> use test;Database changedmysql> select * from xyz;ERROR 2013 (HY000): Lost connection to MySQL server during querymysql>mysql>mysql> select * from xzy;ERROR 2006 (HY000): MySQL server has gone awayNo 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[/code]Error Log :[code="plain"][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[/code]Any suggestion on how to recreate table will be highly appreciated .

Viewing all articles
Browse latest Browse all 223

Trending Articles