A MySQL Vacuum database tables script (auto_increment reset)
MySQL vacuum FAQ: How do I vacuum a MySQL database table, or an entire MySQL database?
This may be an unusual situation, but as I'm creating a new application that uses a MySQL database, I've found that I want a "MySQL vacuum" operation; I want to reset all my MySQL auto_increment counters back to 1 without having to completely drop and then re-create my MySQL database.
Specifically what I'm doing is this: