SQL to backup and restore MySQL database
3 answers
If you are using MySQL 6, you are fine - see http://dev.mysql.com/doc/refman/6.0/en/backup-database-restore.html . If you are using MySQL 5 things are not so rosy - you are probably better off using the mysqldump / external process approach.
+2
a source to share
mysqldump is probably your best bet. You can save table rows with SELECT ... INTO OUTFILE and reload them with LOAD DATA INFILE, but you must do it table by table and write the table schemas to another file for a full backup.
What's wrong with spawning a process to start mysqldump?
+1
a source to share