Thursday, August 16, 2012

For importing mysql database from mysql schema file


For importing mysql database from mysql schema file

$command='mysql -u ' .$username .' -p' .$password .' -h ' .$hostname .' ' .$database .' < ' .$filename;
exec($command,$output=array(),$worked);
if($worked==1){
echo "database import failed";
            exit;
}

No comments:

Post a Comment