Forum Moderators: coopster
$restore = "mysqlimport -u $dbuser -p $dbpass $dbname $location";
$importFile = system($restore, $return);
This is what $restore contains: mysqlimport -u user12345 -p pass12345 database12345 tempdata/backuprestore/mp_database_15-09-2007.sql
I also tried shell_exec instead of system aswell, but this didn't work either. Does anyone know how I can do this with PHP? I need this for my admin panel.
Thanks in advance
Stefan
PS: mysqlimport is used to import data into a already existing database, right? Since that's what I need.
mysqlimport -u user12345 -p pass12345 database12345 tempdata/backuprestore/mp_database_15-09-2007.sql
Run that manually through the command line and see what you get. My guess if you have a minor error somewhere. Also, make sure that safe_mode [us2.php.net] isn't turned on; this might interfere with what you are trying to do.
EDIT: For those looking for something like this: search on Google for BigDump