分类: Mysql/postgreSQL
2008-09-12 21:44:08
mysqldump -p
[root@fedora data]#mysqldump -uroot -p123456 mytestdb>/home/zhoulj/mytestdb.sql
[root@fedora data]# mysql -uroot -p123456 mytestdb
mysqldump -p
在flush binlogs之前,touch一个空文件,在第二天备份时候给这个文件比较,如果比这个文件新就备份。
# mysql -uroot -p123456 mytestdb
/usr/local/mysql/bin/mysqlbinlog fc5-1-bin.000001 |/usr/local/mysql/bin/mysql -uroot -p123456
/usr/local/mysql/bin/mysqlbinlog fc5-1-bin.000002 |/usr/local/mysql/bin/mysql -uroot -p123456
/usr/local/mysql/bin/mysqlbinlog fc5-1-bin.00000n |/usr/local/mysql/bin/mysql -uroot -p123456