Mysql automatic backup

https://www.cnblogs.com/kissdodog/p/4174421.html


http://blog.csdn.net/netuser1937/article/details/53782599


http://blog.csdn.net/testcs_dn/article/details/ 48829785

http://www.jb51.net/article/10137.htm


https://www.cnblogs.com/hesitation/p/6429462.html

http://www.51testing.com/html/28/116228-239892 .html


mysql backup remote database to local
Original July 07, 2015 09:12:27 Tags: mysql/backup/remote 14010
1. First create a database locally (for backup).
Log in to mysql
sudo mysql -u root -p root
create database test; the test here is the same as the remote database name
2. Backup the remote database to the local testbackup.sql
mysqldump -h 172.26.100.145 -uroot -proot test --default-character -set=gbk --opt -Q -R --skip-lock-tables>/home/testbackup.sql
3. Then import testbackup.sql into the local test
Log in to mysql
sudo mysql -u root -p root
use test;
source /home/testbackup.sql;


restore the database:
mysql -hlocalhost -uroot -proot test < testbackup.sql

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326139040&siteId=291194637