fmalh3iro Posted February 16, 2013 at 04:33 PM Report #495575 Posted February 16, 2013 at 04:33 PM Boa tarde, Precisava de ajuda para reparar uma tabela em mysql do tipo innodb. Cumprimentos, Abraço.
NunoDinis Posted February 16, 2013 at 04:35 PM Report #495577 Posted February 16, 2013 at 04:35 PM Penso que é isto que necessitas: http://manual.webhost.com.br/content/reparar-tabelas-de-bancos-mysql Estranha forma de vida que tem a capacidade de transformar comandos em mensagens de erro. ndsotware.org
mjamado Posted February 16, 2013 at 05:01 PM Report #495582 Posted February 16, 2013 at 05:01 PM NunoDinis, isso é para optimizar tabelas, e só se aplica a tabelas MyISAM. fmalh3iro, o que é que aconteceu para as tabelas ficarem corrompidas? Não é muito fácil dar cabo de tabelas InnoDB... Que erros te dá? "Para desenhar um website, não tenho que saber distinguir server-side de client-side" - um membro do fórum que se auto-intitula webdesigner. Temo pelo futuro da web.
fmalh3iro Posted February 16, 2013 at 07:19 PM Author Report #495622 Posted February 16, 2013 at 07:19 PM Olá, Obrigado NunoDinis, mas esse reparar só funciona para as tabelas do tipo MyISAM. O que aconteceu não apercebi, as copias de segurança que faço dos últimos 15 dias aparecem todas incompletas aquando da exportação da tabela com problema. Paras as cópias de segurança utilizo um script do mysqldump. Mas a melhor é que continuou a funcionar e a inserir dados, só que hoje deixou de funcionar e sempre que tento inserir o mysql desliga-se. A nível de erros não consigui ver nada de especial no log diz o seguinte: 130214 15:28:24 [Note] Plugin 'FEDERATED' is disabled. 130214 15:28:24 InnoDB: The InnoDB memory heap is disabled 130214 15:28:24 InnoDB: Mutexes and rw_locks use Windows interlocked functions 130214 15:28:24 InnoDB: Compressed tables use zlib 1.2.3 130214 15:28:24 InnoDB: Initializing buffer pool, size = 16.0M 130214 15:28:24 InnoDB: Completed initialization of buffer pool 130214 15:28:24 InnoDB: highest supported file format is Barracuda. 130214 15:28:25 InnoDB: Waiting for the background threads to start 130214 15:28:26 InnoDB: 1.1.8 started; log sequence number 2948066 130214 15:28:26 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 130214 15:28:26 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 130214 15:28:26 [Note] Server socket created on IP: '0.0.0.0'. 130214 15:28:26 [Note] Event Scheduler: Loaded 0 events 130214 15:28:26 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections. Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL) 130214 15:28:52 InnoDB: Assertion failure in thread 2016 in file btr0pcur.c line 442 InnoDB: Failing assertion: btr_page_get_prev(next_page, mtr) == buf_block_get_page_no(btr_pcur_get_block(cursor)) InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. InnoDB: Thread 328 stopped in file os0sync.c line 474 InnoDB: Thread 3108 stopped in file os0sync.c line 781 130214 15:29:11 [Note] Plugin 'FEDERATED' is disabled. 130214 15:29:11 InnoDB: The InnoDB memory heap is disabled 130214 15:29:11 InnoDB: Mutexes and rw_locks use Windows interlocked functions 130214 15:29:11 InnoDB: Compressed tables use zlib 1.2.3 130214 15:29:11 InnoDB: Initializing buffer pool, size = 16.0M 130214 15:29:11 InnoDB: Completed initialization of buffer pool 130214 15:29:11 InnoDB: highest supported file format is Barracuda. 130214 15:29:12 InnoDB: Waiting for the background threads to start 130214 15:29:13 InnoDB: 1.1.8 started; log sequence number 2948066 130214 15:29:13 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 130214 15:29:13 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 130214 15:29:13 [Note] Server socket created on IP: '0.0.0.0'. 130214 15:29:13 [Note] Event Scheduler: Loaded 0 events 130214 15:29:13 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections. Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL)
mjamado Posted February 17, 2013 at 12:07 AM Report #495712 Posted February 17, 2013 at 12:07 AM O própio relatório aponta-te na direcção correcta: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html "Para desenhar um website, não tenho que saber distinguir server-side de client-side" - um membro do fórum que se auto-intitula webdesigner. Temo pelo futuro da web.
fmalh3iro Posted February 17, 2013 at 09:45 AM Author Report #495756 Posted February 17, 2013 at 09:45 AM Tentei com o innodb_force_recovery = 4 e 6 e o mysql continua a desligar-se quanto tento enviar os dados para um ficheiro. Não entendi como ativar as outras opções: - SRV_FORCE_IGNORE_CORRUPT - SRV_FORCE_NO_BACKGROUND - SRV_FORCE_NO_TRX_UNDO - SRV_FORCE_NO_IBUF_MERGE - SRV_FORCE_NO_UNDO_LOG_SCAN - SRV_FORCE_NO_LOG_REDO
fmalh3iro Posted February 22, 2013 at 08:06 PM Author Report #496685 Posted February 22, 2013 at 08:06 PM Resolvi efectuando um select com limits e enviando para um ficheiro a informação dessa tabela. Usei com limites porque se efetuava um select a informação toda da tabela o mysql desligava-se. Depois eliminei a tabela e voltei a criar e importei os dados recuperados. Não perdi nenhuma informação, apenas tive algumas linhas repetidas. Obrigados pela v/ ajuda. Abraço.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now