????????????mysql?????????????????mysql??????????????oracle??????????????????????????????????????oracle???rman????????????????????');" target="_self">???????????????mysql????в???????????????????????????mysqlbinlog???????????binlog?????????????????????mysqlbinlog???????????????
??????????????????????mysqlbinlog??????????????????????????????????????????????????????????????????????mysqlbackup?????????????
????????????????????
????????????????????
????2.1 ??????A??????????????????????
????2.2 ??????B????????????BKT??????BKT???洴???????JOHN????????5???????
????2.3 ??????C????JOHN?????????????10????
????????????????
????2.4 ????????????A??????????????????
????2.5 ????????????B????????????????
????2.6 ????????????C???????????????
????????????????????裨?????????????????????飩
????3.1 ???????????????
????[root@mysql01 backup]# mysqlbackup --user=root --password --backup-dir=/backup backup-and-apply-log //??????????????????
????3.2 ????????????????????
mysql> SELECT CURRENT_TIMESTAMP;
+---------------------+
| CURRENT_TIMESTAMP |
+---------------------+
| 2014-11-26 17:51:27 |
+---------------------+
1 row in set (0.01 sec)
mysql> show databases; //??δ?????????BKT
+--------------------+
| Database |
+--------------------+
| information_schema |
| john |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.03 sec)
mysql> Ctrl-C --
Aborted
[root@mysql02 data]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.36-log Source distribution
Copyright (c) 2000?? 2014?? Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 107 | | | //????????log??pos??
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
mysql> SELECT CURRENT_TIMESTAMP; //????????? ???????A
+---------------------+
| CURRENT_TIMESTAMP |
+---------------------+
| 2014-11-26 17:54:12 |
+---------------------+
1 row in set (0.00 sec)
mysql> create database BKT; //?????????BKT
Query OK?? 1 row affected (0.01 sec)
mysql> create table john (id varchar(32));
ERROR 1046 (3D000): No database selected
mysql> use bkt;
ERROR 1049 (42000): Unknown database 'bkt'
mysql> use BKT;
Database changed
mysql> create table john (id varchar(32));
Query OK?? 0 rows affected (0.02 sec)
mysql> insert into john values('1');
Query OK?? 1 row affected (0.01 sec)
mysql> insert into john values('2');
Query OK?? 1 row affected (0.01 sec)
mysql> insert into john values('3');
Query OK?? 1 row affected (0.00 sec)
mysql> insert into john values('4');
Query OK?? 1 row affected (0.01 sec)
mysql> insert into john values('5');
Query OK?? 1 row affected (0.01 sec)
mysql> SELECT CURRENT_TIMESTAMP; //????5?????????????????B???????????????????
+---------------------+
| CURRENT_TIMESTAMP |
+---------------------+
| 2014-11-26 17:55:53 |
+---------------------+
1 row in set (0.00 sec)
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 1204 | | | //???binlog??posλ??
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)