Hi!
I'm trying to backup and restore my mySQL database from php. Actually, the backup is being done using a crontab, and works fine.
But when I need to restore, I don't know how to do it from a web page. My customer wants to restore their own database in case they import the wrong info.
I create my backup using mysqldump -u username -pPassword database_name
works great
But I have no idea how to do the reverse:
mysql -uUSERNAME -pPASSWORD db_name < db_backup.sql
It works from the command line, but not from within a php script...
Anyone know how to run such a command from within php?
I tried system_exec(the command here) but it doesn't work (although I get no error).
Thanks for your help
Renaud