Answers for "Export database to sql dump in php"

PHP
0

Export database to sql dump in php

<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$dbname = 'test';
$mysqldump=exec('which mysqldump');


$command = "$mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname > $dbname.sql";

exec($command);
?>
Posted by: Guest on January-06-2021
0

Export database to sql dump in php

exec('C:\\wamp\\bin\\mysql\\mysql5.6.17\\bin\\mysqldump.exe -uroot DatabaseName> c:\\database_backup.sql');
Posted by: Guest on January-06-2021

Browse Popular Code Answers by Language