How to backup the mysql binary files?
When executing this in the command line it prompts for a password even if its mentioned in the syntax.. After typing in the password an error is returned saying that the database (the password) is unkown.. password and database is swapped in the syntax???
syntax
mysqldump --opt -h localhost -u USER -p PASSWORD DB | gzip > /var/mysql_backup.gz
error
mysqldump: Got error: 1049: Unknown database 'PASSWORD' when selecting the database
edit
exec('/usr/bin/mysqldump --opt -h localhost -u USER -pPASS DB | gzip > /var/mysql_backup.gz', $rtn, $err);
echo 'rtn = ';
print_r($rtn);
echo 'err = ';
print_r($err);
Try it without a space after
-p: