12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-11-28 13:03:36
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
[root@test ~]# mysqldump -h 139.100.210.22-u root -p'test123' --default-character-set=utf8 test_db> /tmp/test_db.sql[root@test ~]# mysqldump -h 远程服务
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
[root@test ~]# mysqldump -h 139.100.210.22-u root -p'test123' --default-character-set=utf8 test_db> /tmp/test_db.sql
[root@test ~]# mysqldump -h 远程服务器IP或域名-u 远端数据库账号-p'远端数据库密码' --default-character-set=utf8 数据库名字> /tmp/test_db.sql
可以在本地生成test_db.sql文件
如果要在后台执行,可以写个crontab
[root@t03 ~]# vi /tmp/backup
#!/bin/sh
cd /usr/local/mysql/bin
./mysqldump -h 139.100.210.22-u root-p'test123' --default-character-set=utf8 test_db> /tmp/test_db.sql
然后写入crontab -l
[root@t03 ~]# crontab -l
26 01 * * * /tmp/backup
30 22 * * * /usr/local/mysql/bin/mysqldump -h 139.100.210.22-u root-p'test123' --default-character-set=utf8 test_db> /tmp/test_db.sql
定时执行。
OK
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19