no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | innodb [2013/01/10 21:59] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== InnoDB ====== | ||
| + | * [[MySQL]] | ||
| + | * [[InnoDB Foreign Keys]] | ||
| + | * [[Percona Toolkit]] | ||
| + | * [[pt-find]] | ||
| + | |||
| + | === Find InnoDB tables === | ||
| + | |||
| + | The '' | ||
| + | |||
| + | < | ||
| + | SELECT table_schema, | ||
| + | </ | ||
| + | |||
| + | Use pt-find: | ||
| + | |||
| + | < | ||
| + | pt-find --noquote --engine InnoDB < | ||
| + | </ | ||
| + | |||
| + | === Conversion === | ||
| + | |||
| + | Update MyISAM tables to InnoDB: | ||
| + | |||
| + | < | ||
| + | pt-find --engine MyISAM --exec "ALTER TABLE %D.%N ENGINE=InnoDB" | ||
| + | </ | ||
| + | |||
| + | When changing MySQL configuration, | ||
| + | |||
| + | After you're finished, run mysqlcheck on all the tables to verify their integrity. | ||
| + | |||
| + | === Dump and Recreate === | ||
| + | |||
| + | First, create a database dump that contains the schema only. | ||
| + | |||
| + | < | ||
| + | mysqldump --no-data -r schema.sql --databases < | ||
| + | </ | ||
| + | |||
| + | Create a database dump of the data only: | ||
| + | |||
| + | < | ||
| + | mysqldump --no-create-db --no-create-info -r data.sql --databases < | ||
| + | </ | ||