Posted by damezumari on 06/20/07 18:47
I got it to work by changing "-p $dbpass" to "--password=$dbpass"!
This works:
$dbname = 'ol';
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$backupFile = $dbname .'-' .date("Y-m-d-H-i-s") . '.sql';
$command = "mysqldump --opt -h $dbhost -u $dbuser --password=$dbpass
$dbname > $backupFile";
$dummy = system($command, $retval);
die($retval);
What remains is not to be dependent on mysqldump.exe in the script's
folder.
Regards,
Jan Nordgreen
Navigation:
[Reply to this message]
|