For similar scenarios using other databases, see: Scenario: Resetting a DB auto-increment, Scenario 1: Removing and regenerating a MySQL table index.