How can you back-up and restore databases (particularly MySQL) using PHP? I know phpMyAdmin has similar functionality, but I would like this to be done through the admin interface on an online store. How does phpMyAdmin do it?
Just exec() mysqldump from within your PHP...
Chris
Okay, how would you restore that database?
mysql -uuser -ppass < thefile.dump is a way to execute the sql commands on the mysql prompt. My favorite way (if you have root) is to backup the datadir of mysql and restore it when needed.