03
sep
2008

Changing default storage engine in MySQL

This took me a while to figure out so I thought I'd put it here for future reference! I needed to change it so that Django would use innoDB rather that MyISAM, it seemed to just take the default and I couldn't find an override.

You need to locate the mySQL config file (helpfully named) my.cnf file. On Centos 5.2 it is located at /etc/my.cnf

Then under the [mysqld] add the following line as shown below! [mysqld] default-storage_engine = innodb ...

Finally, restart mySQL;

$ service mysqld restart

It's pretty easy to do when you know how and now you have transactional tables by default :)

Previous Post: Chrome after a couple of hours
Next Post: The day the Robot attacked

Short url - Related tags: centos, django, innodb, mysql

blog comments powered by Disqus