探索,發現,愛好、學習,記錄,分享。
學海無涯,天涯若比鄰,三人行,必有我師。

MySQL – Convert all Tables of one or more Database(s) from MyISAM to InnoDB and vice-versa

Have you ever needed to convert one, some or all the tables of a MySQL Database from MyISAM toInnoDB or the other way around?

Here’s a couple queries you can use to achieve such results. As you will notice, they won’t execute the commands – they will basically create a list of the actual queries you’ll need to perform to actually execute the change, so you can review it just before it goes live. To execute the queries, just cut-paste the resulting row and execute them (each row is a single working query).

To convert all DBNAME’s InnoDB Tables to MyISAM

To convert all DBNAME’s MyISAM Tables to InnoDB

To convert all InnoDB Tables to MyISAM (all databases)

To convert all MyISAM Tables to InnoDB (all databases)

 

Once again, these commands will build a list of queries you will have to execute to actually perform the conversion: to actually perform the change you’ll have to execute them.

That’s all for now: happy conversion!

版權聲明:本文采用知識共享 署名4.0國際許可協議 [BY-NC-SA] 進行授權
轉載事宜:如需轉載需徵得應允,轉載必須注明來源於本站的信息。
文章名称:《MySQL – Convert all Tables of one or more Database(s) from MyISAM to InnoDB and vice-versa》
文章链接:https://www.thefreesky.com/blog/24669.html
本站資源僅供個人學習交流,請於下載後24小時內刪除,不允許用於商業用途,否則法律問題自行承擔。

評論 抢沙发