Hi all, my mysqldump command keeps returning an empty file. Anyone know what I am doing wrong? Here is my code:
$command = "mysqldump -u $dbuser -p $dbpass $dbname > $backupFile"; system($command);
Remove spaces after -u and -p, or the command prompts for user input:
$command = "mysqldump -u$dbuser -p$dbpass $dbname > $backupFile"; system($command);
Helps if can run SSH on your hosting, to test commands at the prompt and watch for probs.
Thank you so much BillKat!!
That worked perfectly. I can't believe something that simple made so much of a difference. I looked all over for parameter information and nothing mentioned the spaces.
I don't know what SSH is, but I will look into it.