Update – May 2013: I’ve received a few emails asking how to prevent this script from continuously eating up disk space… Rather than re-invent the wheel, I just use built in Linux commands in my root crontab that run once a day: 0 4 * * * find /home/tim/backups/ -mtime +10 -exec rm {} \;… Read more »
Posts Tagged: MySQL
MySQL Tip: How To Sterilize a MySQL database
To sterilize the any mysql database and reset auto increments to 0, without deleting the table you can: Login to database: mysql -u dbusername -p Delete all rows: DELETE FROM databasename; // (not specifying terms deletes all rows) Reset Auto-inc: ALTER TABLE databasename AUTO_INCREMENT = 0;