3

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

1 Answer 1

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 !!!

3
  • 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, 2011 at 7:19
  • Updated my answer to set storage engine default only !!! Oct 4, 2011 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, 2011 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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