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.5.4 mysqldump — A Database Backup Program

2017-3-8 5:16:30

服務器運維

忘记Linux 3.X宝塔面板密码的解决方案

2017-3-8 21:02:11

0 Reply AAuthor MManager
歡迎您,新朋友,感謝參與互動!
    暫無討論,說說你的看法吧
搜索