Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Help with mysqldump

Codes here !

Moderators: macek, egami, gesf

Help with mysqldump

Postby kelvin24 » Sun Sep 23, 2012 7:32 am

Code: Select all

$dbhost   = "localhost";
$dbuser   = "root";
$dbpwd    = "kelvin";
$dbname   = "softeng";
$dumpfile = $dbname . "_" . date("Y-m-d_H-i-s") . ".sql";

passthru("/usr/bin/mysqldump --opt --host=$dbhost --user=$dbuser --password=$dbpwd $dbname > $dumpfile");

// report - disable with // if not needed
// must look like "-- Dump completed on ..."

echo "$dumpfile "; passthru("tail -1 $dumpfile");


I've got this code from this tutorial ... up_php.htm
and by some reason its not working on me. Its not creating a backup...someone pls help!
New php-forum User
New php-forum User
Posts: 12
Joined: Mon Aug 13, 2012 5:11 pm

Return to mySQL & php coding

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.