Automating MySQL Database Backups

One of the most critical tasks for a MySQL administrator is reliably backing up and restoring databases. This, of course, helps to prevent data loss in the event of a hardware failure, data corruption… or a little accident. Most modern hosting/server solutions have some kind of database backup solution available. However, many people prefer to…

MySQL Random Row

To get a random row from your table, you can use the following trick: This will return a single random row from myTable. Remember that you can also use a WHERE clause to narrow down the records before choosing a random one. This is a more efficient way of finding a random result than it…