2π
β
One step that can make manually resetting easier is (and avoid the dread ERROR 1217):
SET foreign_key_checks = 0
From http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html:
InnoDB does not allow you to drop a
table that is referenced by a FOREIGN
KEY constraint, unless you do SET
foreign_key_checks = 0. When you drop
a table, the constraints that were
defined in its create statement are
also dropped.
π€J. Heasly
Source:stackexchange.com