I have made a database and 10 tables in mysql(table type NONE) and i can\'t create foreign keys. An alert message says
SQLyog The selected table does not support for
Typically, InnoDB is used to support foreign keys, and transactions:
http://dev.mysql.com/doc/refman/5.1/en/innodb.html
You can change the table engine on the fly:
ALTER TABLE tableName ENGINE = InnoDB;
You can also change the default -- for newly created tables -- as shown here:
http://dev.mysql.com/doc/refman/5.1/en/storage-engine-setting.html
The engine you're using doesn't support foreign keys (as the error message tells you obviously). You can change the engine you're using with
ALTER TABLE `tableName` ENGINE = newEngine;
Yes. The default storage engine (MyISAM) does not support foreign key constraints.
I was having same problem until I found this post.
For addressing the limitation of MyISAM or NDB (Cluster), constraints can be enforced using triggers.
The MyISAM engine DOES support foreign keys. What it doesn't support is foreign key constraints.
You can go ahead and create as many foreign keys as you like - but don't expect the database to enforce integrity for you.
Don't change engines in your application without significant testing; changing engine will affect behaviour and is not recommended without great care and a lot of QA work. In particular, switching from MyISAM to InnoDB will break your application if: