Created
January 3, 2016 17:09
-
-
Save hugsbrugs/c2b1597c33ee528cc6d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// IN SAME REPO AS THIS FILE | |
// YOU SHOULD HAVE my_database_dump.sql FILE | |
// ADD AT TOP OF THIS FILE | |
// use my_database_name; | |
echo "Your database is being restored.......<br>"; | |
system("cat my_database_dump.sql | mysql --host=localhost_or_other --user=my_db_username --password=my_db_password my_database_name"); | |
echo "It's over. Your database has been restored."; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment