Skip to content

harisrozak/php-restore-mysql-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

#PHP Restore MySQL Database Run this php file on cron or direct url to restore your specific MySQL database from a sql dump file.

Make sure you have fill all required variable on this file, for example:

$key = 'yourpassword';

$this->cred['host'] = "localhost";
$this->cred['user'] = "root";
$this->cred['passwd'] = "root";
$this->cred['dbName'] = "example_db";
$this->cred['dumpdir'] = "/home/harishost/backups-db/example_db.sql";
$this->cred['prefix'] = "wp_";

##Usage Example Direct url usage

http://demo.example.com/restore-database.php?key=yourpassword

Cron command

/usr/bin/wget -q -O temp.txt http://demo.example.com/restore-database.php?key=yourpassword

About

Restore your specific MySQL database from a sql dump file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages