Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

Change a MySQL Table from MyISAM to InnoDB
13 July 2010 @ 20:03 BST
by Paul

If you want to use proper database features in mysql - the sort that Postgresql has as standard - you need to use the InnoDB storage engine rather than the default MyISAM.

To see what sort of storage engine your tables are currently using do this in the mysql shell:

SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'test';

Replace 'test' with the name of your database. Then, to convert the table to the InnoDB engine, do this:

alter table tablename ENGINE = InnoDB;

Replace 'tablename' with the name of the table you want to convert.

Hat tip: here and here

Tags: mysql



Comments disabled