can i back up mysql database from php code 3f

Solutions on MaxInterview for can i back up mysql database from php code 3f by the best coders in the world

showing results for - "can i back up mysql database from php code 3f"
Emmanuel
30 Jan 2020
1<?php
2
3ini_set('display_errors', 1);
4ini_set('display_startup_errors', 1);
5error_reporting(E_ALL);
6
7$database = 'db';
8$user = 'user';
9$pass = 'pass';
10$host = 'localhost';
11$dir = dirname(__FILE__) . '/dump.sql';
12
13echo "<h3>Backing up database to `<code>{$dir}</code>`</h3>";
14
15exec("mysqldump --user={$user} --password={$pass} --host={$host} {$database} --result-file={$dir} 2>&1", $output);
16
17var_dump($output);
Rayane
17 Oct 2019
1<?php
2   $dbhost = 'localhost:3036';
3   $dbuser = 'root';
4   $dbpass = 'rootpassword';
5   
6   $backup_file = $dbname . date("Y-m-d-H-i-s") . '.gz';
7   $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass ". "test_db | gzip > $backup_file";
8   
9   system($command);
10?>
queries leading to this page
take db back up phpphp to back up mysql database tablephp database backup librarysimple database backup using php designmysql db backup sql phpmake mysli backup using phpphp script to backup databasedatabase backup script in phpmysql database backup php scriptsql php html backup databasedatabase backup php codehow to make database backup with phphow to create weekly mysql database backup using phphow to backup sql database in phpdjango php mysql databas auto backupbackup database using phpdatabase backup using php designmysql backup command for phpbackup database sql server using phpphp backup mysql database downloadphp make database backupsphp backup mysqlbackup mysql database php codecreate database backup using phpphp script to create mysql database backuphow to backup database in phpphp backup databasedatabase backup using phpauto backup multiple db with phphow to take database backup in phpsave backup database phphow to create database backup automatic in phpphp backup database to sql filehow to make database backup using phpphp mysql save backupmysql backup in phpcan i back up mysql database from php code 3fmake whole database backup with php scriptbackup database from mysql to phpphp code for mysql database backupbackup database sql phpdatabse backup in phpgenerate sql server backup through phpphp script backup mysql databasedownload mysql database using phpphp download database backupbackups from php programphp backup mysql database automaticallyhow to take backup of database in phphow to backup database in mysql using phpautomatic database backup in phpphp script to backup dbbackup database phpbackup database with phphow to make database backup in mysql with phpphp backup mysql databasephp backupdatabasescript to create db backup phpcreate database backup programmatically phpphp to back up mysql databasehow to backup database in sql server use phphow to create sql backup in phpphp create database backupphp mysql database backup scriptmysql db backup phpphp db backupphp database backupmysql backup database php scripthow to backup php mysql databasemysql backup all databases php scriptphp script to backup mysql databaseautomatic database backup in php codephp backup mysql database automatically in localhostdatabase backup using php with source codehow to take backup of mysql database using php codemake database backup using phpcreate database backup file phpcall site php backup mysql databasephp script for automatic database backupphph crud backup tablephp backup sql databasephp code to take backup of mysql databasecan i back up mysql database from php code 3f