MySQL Database Dump To Project Folder
Do it in 2 steps...

Write a SELECT against information_schema.TABLES to generate one mysqldump statement per table.  Send the output of that to a file; then execute that file.  (Also, give the file execute permission).