Question

Possible Duplicate:
How do I convert a database from MyISAM to InnoDB?

Due to a bug in the Backup and Migrate module http://drupal.org/node/1128620 , all of my DB tables were reverted to MyISAM. How to return them all back to to InnoDB. (Perhaps using phpmyadmin?)

I used to use http://drupal.org/project/dbtuner/ in D6 for this. However there isn't a D7 version.

Also, are there any side effects or possible gotchas for switching this in this way?

Update:

<?php
    // connect your database here first 
    // 
    $sql = "SHOW tables";
    $rs = mysql_query($sql);

    while($row = mysql_fetch_array($rs))
    {
        $tbl = $row[0];
        $sql = "ALTER TABLE $tbl  ENGINE=INNODB";
         mysql_query($sql);
    }
?>

What do I need to add to the section "connect your database here first" to connect to my Drupal DB?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top