Another simple backup script. This script builds on the rsync file backup to allow daily, monthly, and yearly incremental MySQL database backups. The backup will […]
Continue readingCategory: MySQL
MySQL
Reset the auto increment number in a MySQL table
To reset the auto increment number in a MySQL table, simply run the following command: ALTER TABLE table AUTO_INCREMENT=1 Replace the number 1 with the […]
Continue readingFinding Duplicate Rows in SQL
I used this to solve a problem today. // Finding duplicates in a table SELECT email, COUNT(email) AS NumOccurrences FROM users GROUP BY email HAVING […]
Continue readingHow to Repair a MySQL Database
If a server is shutdown unexpectedly (power outage or hardware failure), one or more MySQL tables can be locked open and may need to be […]
Continue reading