February 4th, 2013, 12:59 PM
I'm trying to throw a sql backup script together, but for some reason I cannot get mysqldump to create the file. The directory has all permissions enabled. This is my first time using mysqldump so there could be something wrong with the syntax.
NOTE: All the config variables have been set with the correct information.
$backupfile = $dbname . date("Y-m-d") . '.sql';
system("mysqldump -h $dbhost -u $dbuser -p $dbpass $dbname > $backupfile");
If someone could help me out I'd really appreciate it.
February 4th, 2013, 02:15 PM
Put the command into a variable and echo the variable. Does it work if you try running it manually?
February 4th, 2013, 05:47 PM
February 4th, 2013, 07:04 PM
I removed the space after -p and I set the line as a variable and tried echoing it, but still no luck. I do appreciate the help.
I just got back in front of the computer so I'll keep playing around with it for the next couple hours, and hopefully I'll be able to get it working.