Im trying to back my database up by using mysqldump and saving the results in a .sql file. However the file is returned with a few lines of text and not the sql of the tables.
Here is a snipet of the code i am using:
$LOCAL_DUMP_PATH = "db_back/"; $FILENAME_PREFFIX = "sqldump"; $filename = $FILENAME_PREFFIX.date("YmdHis").".sql"; $dump_cmd = "mysqldump -h'$DB_HOST' -u'$DB_USERNAME' -p'$DB_PASSWORD'"; $dump_cmd .= " --all-databases"; $dump_cmd .= " > $LOCAL_DUMP_PATH$filename"; exec($dump_cmd);