Generales

Update engine to all your mysql tables

How to list all tables and build the query to change ENGINE.

mysql -u root -p -e “SELECT concat(‘ALTER TABLE ‘, TABLE_NAME,’ ENGINE=MYISAM;’) FROM Information_schema.TABLES WHERE TABLE_SCHEMA = ‘wp_occidente’ AND ENGINE = ‘InnoDB’ AND TABLE_TYPE = ‘BASE TABLE'” | tail -n+2 >> alter.sql

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s