Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Thursday, March 10, 2016

export database without phpmyadmin

Hi! sometimes you need to get database, but you haven't phpmyadmin/sqladminer nor or you just want to do it faster.
So you can do it loggining via ssh and use some mysql command or create script with

<?php
exec('mysqldump --user=MYUSERNAME --password=MYPASSWORD --host=localhost MYDATABASENAME > backup.sql');
exit('done');

and run it