I was wondering if anyone had any insight on a quick way to lock the databases of a MySQL server so that data does not change during a backup. I know it seems like a funny question, and I have gone over all kinds of options, but I was just wanting to toss this up here to see if anyone can bring any ideas to light that I may be missing. I am looking for something that can be scripted via command line that could be used on a live database, something that may add a delay to queries until it is finished, rather than erroring out. Or even any ideas of the best practices when it comes to automated backups of a database in case of server or hard drive failure, where there are already off site file backups.