Posted by:
joelim
(---.153.95.219.klj01-home.tm.net.my)
hi...
joe here... i m using wamp version 1.4.4.
can some body help me on how to dump database instead of using phpmyadmin.
i do write a simple code..but it do not give any response to me...
my code:
<?php
$dbhost= 'localhost';
$dbuser= 'root';
$dbpass= '';
$dbname= 'amanagement';
$backupFile = $dbname . date("Y-m-d-H-i-s"
. '.gz';
$command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile";
system($command);
?>
pls help.....but it work fine if i m using phpmyadmin or even i write the dump code in batch file...
my batchfile code:
C:\wamp\mysql\bin
mysqldump amanagement > amanagement.sql
but this file save only in the bin directory.
regards
joelim