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...

Install mod_pagespeed module cPanel

A custom module for CPanel WHM using CPanel Easy Framework - allows easy installation of...

Install Mod_Sec Control di cpanel

1. install ConfigServer ModSecurity Control (cmc) untuk...

Instalasi cPanel pada Server Centos

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

Error shell_exec() has been disabled for security reasons

Warning: shell_exec() has been disabled for security reasons in...