title: How to drop tables with cyclic foreign keys in MySQL
body: <p>I have two tables, Parent and Child. The column Parent.favorite_child has a foreign key constraint pointing to Child.id. And the column Child.parent has a foreign key constraint pointing to Parent.id.</p>
  
  <p>Now here's the weird part. I'm trying to drop my Child table, which <strong>contains no records</strong>, but MySQL is giving me the error:</p>
  
  <pre><code>ERROR 1217: Cannot delete or update a parent row: a foreign key constraint fails
  SQL Statement:
  drop table `mydatabase`.`Child`
  </code></pre>
  
  <p>Why is MySQL throwing this error? There are literally no records in the Child table with which anything could be pointing to or from.</p>