3

Can I make Drupal default to MyISAM for new tables instead of InnoDB? Except for hacking the core, that is.

2

The quickest and dirtiest way to get all Drupal data into MyISAM perform the following:

Make a backup of /var/lib/mysql before doing these steps

step 1. mysqldump all data out of mysql

step 2. remove all folders and files from /var/lib/mysql, but leave the /var/lib/mysql/mysql alone because it contains user grants.

step 3. add this line in /etc/my.cnf

[mysqld]
skip-innodb

step 4. service mysql restart

step 5. reload mysqldump file back into data into mysql database

UPDATE 2011-10-04 04:28 EDT

step 1. Set Default Storage Engine to MyISAM

add this line in /etc/my.cnf

[mysqld]
default-storage-engine = MyISAM

step 2. service mysql restart

Give it a Try !!!

  • The problem with this solution is that it disabled InnoDB for everyone, and I'm interested in disabling it for a single database / site. – Daniel Oct 4 '11 at 7:19
  • Updated my answer to set storage engine default only !!! – RolandoMySQLDBA Oct 4 '11 at 8:32
  • 1
    A very significant caveat: D7 is built with the assumption that transactions exist. IMO you can't expect Drupal 7 to behave predictably with s non-trsnsactional engine like MyIsam. – rfay Oct 4 '11 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.