Jump to content

Mysqldump not working


lucasl

Recommended Posts

Hi!
[code]<?php
$error = 0;
$backupFile = 'freesearch' . date("Y-m-d") . '.sql';
$command = "mysqldump --opt -h $dbhost -u $dbusername -p $dbpassword $dbname > $backupFile";
system($command, $error);
echo "$error";
?>[/code]
This script should work fine, and $error returns 1, but for some reason, I can't find the sql file. (I looked in the folder the script is in, public_html and the root)
Any ideas?
Link to comment
https://forums.phpfreaks.com/topic/33873-mysqldump-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.