Mysqldump dengan PHP

Berikut ini script untuk membuat backup database dengan mysqldump pada script php


mysql_connect("host", "user", "pass");
$databases = mysql_query("SHOW databases");
while($db = mysql_fetch_array($databases)) {

echo "database => {$db[0]} ";
passthru("/usr/bin/mysqldump --databases {$db[0]} > /backup/hasil/{$db[0]}.sql");
echo "mysqldump complete {$db[0]}.sql";

  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Change Your FTP Port

Lately FTP has been a problem for a lot of hosting providers. Especially since the recent influx...

Optimize MySQL

You could try running the following script to see the recommendations it provides: Code:...

Instalasi cPanel pada Server Centos

Langkah-langkah yang harus disiapkan. 1.Pastikan anda memiliki koneksi Internet yang stabil...

How to Install mod_geoIP for cPanel

Please do the following steps: # cd /var/cpanel/easy/apache/custom_opt_mods # wget...

Install Clamav cPanel Command Line

Berikut perintah untuk install clamav tanpa harus login ke WHM...