$User = ""; // Put New user -- CPanel user or MySQL user with All permissions is fine.
$Password = ""; // Put New Password
$DatabaseName = ""; // Put Database name
$File = ""; // Put the complete path here -- /home/user/database.sql for example
$Results = shell_exec( "mysqldump --allow-keywords --opt -u$User -p$Password $DatabaseName > $File");
Just upload the file on the web server and execute it. Do remember to specify the path of the file so that it is accessible from the web e.g. provide any path which is inside public_html or www folder on most servers.
It will take just few seconds for 300-400MB database and then you can download the file and use it as you like.Blog/Web Development