I'm allowed to use mysqldump, but not using the shell. So I need a PHP script to run mysqldump command
I tried these (I did a search in the forum and found them), but with NO success...:
<?php
$command = "/usr/bin/mysqldump --opt --host=sql.xxx.it --user=xxx --password=xxx databasename > backup.sql";
passthru($command,$error);
if ($error) {
echo "Error: ". $error;
}
?>
<?php
$server = "sql.xxx.it";
$user = "xxx";
$pass = "xxx";
$connect = mysql_connect($server,$user,$pass);
$getdump = mysql_query("/usr/bin/mysqldump --opt databasename > backup.sql", $connect);
?>