???MySQL?????????????????
???????????? ???????[ 2012/12/7 10:03:04 ] ????????
?????????????????????????????????????????????????????????????????????
1.mysql> set global sql_log_bin=0;
2.mysql < /myback/2012-12-3.19-23.full.sql ##??????????????-u -h?
3.???????????????
4.mysql> set global sql_log_bin=1;
5.mysql> show databases;
????????????????????????
1.mysql> set global sql_log_bin=1;
2.mysql> show databases;
????2.3 ???????????????linux???????????????????С???????????????????????????????????????????????????
????2.3.1 ????????
1.mysql> use laoguang;
2.mysql> insert into linux (name) values ('haddop')?? ('mysql');
3.mysql> drop table linux;
4.mysql> show master status; ##??????????????????е?λ??
5.+------------------+----------+--------------+------------------+
6.| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
7.+------------------+----------+--------------+------------------+
8.| mysql-bin.000001 | 9005 | | |
9.+------------------+----------+--------------+------------------+
??????????????????????????????????????????????????????????????????????????????λ????????????λ??
????2.3.2 ???????????????????????????????
1.mysql > set global sql_log_bin=0;
2.mysql < /myback/2012-12-3.19-23.full.sql
????2.3.3 ????????????λ??
1.mysqlbinlog /mybinlog/mysql-bin.000001
2.# at 8893
3.#121202 14:14:07 server id 1 end_log_pos 9005 Query thread_id=5 exec_time=0 error_code=0
4.SET TIMESTAMP=1354428847/*!*/;
5.DROP TABLE `linux` /* generated by server */
6./*!*/;
7.DELIMITER ;
8.# End of log file
????2.3.4 ???????????????8893???????????????????????????????????????????
1.mysqlbinlog --stop-position=8893 /mybinlog/mysql-bin.000001 > /tmp/change.sql
2.--start-position ??????????????????????
3.--stop-position ??????????
4.--start-datetime ???????儷??????"2005-12-25 11:25:56"
5.--stop-datetime ???????????
????????????????????????????????????????????????????????????????????????????????????????????м??????????λ????????????????????
????????ζ???????????mysql?????
mysql < /tmp/change.sql
??????????????????????л??
mysql> select * from linux;
????????mysqldump?????????????????+??????????????л?????
????????????lvm???????????MySQL
??????????MySQL??????????????lvm??????????????????
????3.1 ????lvm???飬?????/data/mydata?£????????????
????3.2 ?????MySQL????????????/data/mydata????????????????
????3.3 ????????????????????
????3.4 ??MySQL??????б??????????????????????????Ч?????????
1.mysql> flush tables with read lock;
2.mysql> flush logs;
3.mysql> show master status;
4.+------------------+----------+--------------+------------------+
5.| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
6.+------------------+----------+--------------+------------------+
7.| mysql-bin.000002 | 107 | | |
8.+------------------+----------+--------------+------------------+
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11