Last active
August 25, 2016 00:54
-
-
Save evanre/a15c5baf336f2e6c3eb20eb94f2bdb8e to your computer and use it in GitHub Desktop.
Use this method, if you need site database, but you have access to site only via ftp (and no access to mysqlserver\phpmyadmin\cli). Copy file to site root, paste db acces info to string (delete double underscores), and open in browser http://site.com/sql-dump.php. Done. Warning! It's VERY unsafe to leave file on server. Make your dump and delete…
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 | |
// Make dump of database via php | |
exec('mysqldump --user=__user_name__ --password=__user_pass__ --host=__host(localhost)__ __db_name__ > dump.sql'); | |
print_r('Dump saved'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment