mysql_storageengine
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mysql_storageengine [2015/10/27 09:32] – created luke7858 | mysql_storageengine [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| \\ | \\ | ||
| mysql < 5.5 the default engine is MyISAM | mysql < 5.5 the default engine is MyISAM | ||
| + | \\ | ||
| + | \\ | ||
| + | Before we convert tables we can first view the table engine with: | ||
| + | \\ | ||
| + | **Note**: Change ' | ||
| + | <sxh bash> | ||
| + | SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = ' | ||
| + | </ | ||
| + | Now we have viewed the table engine we can go ahead and convert the tables. | ||
| + | \\ | ||
| + | \\ | ||
| + | Example: Changing MyISAM tables to InnoDB | ||
| + | \\ | ||
| + | \\ | ||
| + | **Note**: Change ' | ||
| + | <sxh bash> | ||
| + | SET @DATABASE_NAME = ' | ||
| + | |||
| + | SELECT | ||
| + | FROM information_schema.tables AS tb | ||
| + | WHERE | ||
| + | AND | ||
| + | AND | ||
| + | ORDER BY table_name DESC; | ||
| + | </ | ||
| + | An example of this being run is: | ||
| + | <sxh bash> | ||
| + | mysql> SET @DATABASE_NAME = ' | ||
| + | Query OK, 0 rows affected (0.00 sec) | ||
| + | |||
| + | mysql> | ||
| + | mysql> SELECT | ||
| + | -> FROM information_schema.tables AS tb | ||
| + | -> WHERE | ||
| + | -> AND | ||
| + | -> AND | ||
| + | -> ORDER BY table_name DESC; | ||
| + | +-----------------------------------------------------+ | ||
| + | | sql_statements | ||
| + | +-----------------------------------------------------+ | ||
| + | | ALTER TABLE `wp_users` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_usermeta` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_term_taxonomy` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_term_relationships` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_terms` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_posts` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_postmeta` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_popularpostssummary` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_popularpostsdata` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_options` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_links` ENGINE=InnoDB; | ||
| + | | ALTER TABLE `wp_comments` ENGINE=InnoDB; | ||
| + | +-----------------------------------------------------+ | ||
| + | 12 rows in set (0.00 sec) | ||
| + | |||
| + | </ | ||
mysql_storageengine.1445938334.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
