2009-12-10 7 views
9

Ho fatto un wipe e ripristinato.Non riesco a convertire myISAM in innodb

  1. Ho eseguito il backup delle mie attuali tabelle innodb. (mysqldump)
  2. L'ho caricato nel database.
  3. Per qualche motivo ... i tavoli ora sono tutti myisam invece di innodb ... strano!
  4. Cerco di fare:

    ALTER TABLE xxx ENGINE = innodb;

E non fa niente a nessun tavolo.

"Mostra stato tabella" ancora è "MyISAM"

mysql> alter table auth_user_user_permissions engine=innodb; 
Query OK, 0 rows affected, 1 warning (0.06 sec) 
Records: 0 Duplicates: 0 Warnings: 0 



+------------+----------+----------------------------------------------------------------+ 
| Engine  | Support | Comment              | 
+------------+----------+----------------------------------------------------------------+ 
| MyISAM  | DEFAULT | Default engine as of MySQL 3.23 with great performance   | 
| MEMORY  | YES  | Hash based, stored in memory, useful for temporary tables  | 
| InnoDB  | DISABLED | Supports transactions, row-level locking, and foreign keys  | 
| BerkeleyDB | NO  | Supports transactions and page-level locking     | 
| BLACKHOLE | YES  | /dev/null storage engine (anything you write to it disappears) | 
| EXAMPLE | NO  | Example storage engine           | 
| ARCHIVE | YES  | Archive storage engine           | 
| CSV  | YES  | CSV storage engine            | 
| ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables     | 
| FEDERATED | DISABLED | Federated MySQL storage engine         | 
| MRG_MYISAM | YES  | Collection of identical MyISAM tables       | 
| ISAM  | NO  | Obsolete storage engine          | 
+------------+----------+----------------------------------------------------------------+ 



# * InnoDB 
# 
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. 
# Read the manual for more InnoDB related options. There are many! 
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB. 
#skip-innodb 

innodb_buffer_pool_size = 10000M 
innodb_additional_mem_pool_size = 20M 
innodb_log_file_size=1024M 
innodb_log_buffer_size=8M 
innodb_flush_log_at_trx_commit = 0 


mysql> alter table auth_group engine=innodb; 
Query OK, 0 rows affected, 1 warning (0.05 sec) 
Records: 0 Duplicates: 0 Warnings: 0 

mysql> show warnings; 
+---------+------+----------------------------------------------------+ 
| Level | Code | Message           | 
+---------+------+----------------------------------------------------+ 
| Warning | 1266 | Using storage engine MyISAM for table 'auth_group' | 
+---------+------+----------------------------------------------------+ 
1 row in set (0.00 sec) 
+1

Questa è una longshot, ma è possibile che la nuova installazione di MySQL non includa il supporto di InnoDB? Per vedere i motori supportati emettere la seguente query: 'show engines;'. Qual è l'output? – Asaph

+0

Vedo che hai incluso un aggiornamento che mostra che c'è un avviso. Qual è l'output della seguente query: 'show warnings;'? – Asaph

+0

Le versioni molto vecchie di MySQL non hanno InnoDB abilitato di default. Quale versione di MySQL stai usando? Qual è l'output della seguente query: 'select version();'? – Asaph

risposta

10

vedo nel vostro show engines output che InnoDB è disattivato nel tuo MySQL installazione. Devi abilitarlo per poter convertire le tue tabelle da MyISAM a InnoDB.

+1

Come posso abilitarlo? – TIMEX

+0

@alex: quale versione di MySQL stai usando? Controlla con 'select version();'. – Asaph

+0

@alex: ci sono voci nel log degli errori MySQL (durante l'avvio, forse) che sembrano essere correlate al supporto di InnoDB? – Asaph

Problemi correlati