Server Maintenance

How to convert InnoDB to MyISAM

Updated January 2026 8,071 views 1 min read
Server Maintenance | Updated January 2026

Converting tables between InnoDB and MyISAM storage engines is occasionally needed for specific performance or compatibility reasons. In most cases, InnoDB is the better choice for modern applications. Here is how to convert if needed.

01. Convert All Tables in a Database

Via SSH, generate and run the ALTER statements for all tables:

mysql -u dbuser -p -N -e "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=MyISAM;') FROM information_schema.TABLES WHERE TABLE_SCHEMA='dbname' AND ENGINE='InnoDB';" | mysql -u dbuser -p dbname
Think Before Converting

InnoDB is almost always better. It supports transactions, row-level locking, crash recovery, and foreign keys. MyISAM is only preferred for read-heavy tables that never get concurrent writes. WordPress, Joomla, and all modern CMS platforms are designed for InnoDB. Converting to MyISAM can cause data corruption under concurrent write loads.

For ibdata1 management and InnoDB disk space, see Clean/Shrink ibdata1. For database optimization, see Backup MySQL.

Database Help?

Open a Support Ticket

Quick Recap

  1. ALTER TABLE ... ENGINE = MyISAM to convert
  2. InnoDB is better for most applications
  3. MyISAM only for read-heavy, no-concurrent-write scenarios
  4. Back up before converting
  5. Do not convert WordPress tables to MyISAM

Database administration · Last updated March 2026 · Browse all Server Maintenance articles

Share: X in Reddit f Email
  • 118 Users Found This Useful

Was this answer helpful?

Related Articles

error: db3 error(-) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery

Server Maintenance | Updated January 2026 The error db3 error(-30974) from dbenv->failchk:...

Repairing and Optimizing all MySQL and MariaDB Databases on the Server

Server Maintenance | Updated January 2026 Regularly repairing and optimizing MySQL/MariaDB...

Remount /tmp with exec permission

Server Maintenance | Updated January 2026 Some software installations and compilation tasks...

Failed to start tailwatchd - Unit tailwatchd service entered failed state

Server Maintenance | Updated January 2026 The error Failed to start tailwatchd - Unit...

VPS Time Not Correct with Time Server

Server Maintenance | Updated March 2026 When a VPS or dedicated server's system clock drifts...



Save 30% on web hosting - Use coupon code Hosting30