???MySQL?????????????????
???????????? ???????[ 2012/12/7 10:03:04 ] ????????
????1??????mysqldump?????????????????mysql????????????????????????????
????2??????lvs????????????????????????????????????????????????????????
????3??????percona?????xrabackup??????????????????????
??????黷????RHEL5.8??SElinux????MySQL??tar???????????汾5.5.28
?????????????????
????1.1 mysql????????????http://laoguang.blog.51cto.com/6013350/1039208
????1.2 ??/etc/my.cnf????????????????????????????????innodb???????
?????????????????????????
1.mkdir /mybinlog
2.chown mysql:mysql /mybinlog
???????my.cnf
1.vim /etc/my.cnf
2.log-bin=/mybinlog/mysql-bin ##????????????????????
3.innodb_file_per_table = 1 ##????InnoDB?????????????????п???????????
???????mysqld
service mysqld start
????1.3 ??????????????????
1.mysql> create database laoguang;
2.mysql> use laoguang;
3.mysql> create table linux (id tinyint auto_increment primary key??name char(10));
4.mysql> insert into linux (name) values ('apache')??('nginx')??('php');
????1.4 ????????????????
1.mkdir /myback
2.chown -R mysql:mysql /myback
??????????mysqldump??????
????2.1 mysqldump?????±????????????????п????????????????????????????????????????????λ??
1.mysqldump --all-databases --lock-all-tables --routines --triggers --master-data=2
2.--flush-logs > /myback/2012-12-3.19-23.full.sql
3.
4.--all-databases ???????п?
5.--lock-all-tables ????б?????
6.--routines ?洢????????
7.--triggers ??????
8.--master-data=2 ?????????м????????????????λ?????????????1?????????????????в???????
9.--flush-logs ??????????
??????????б?????????????????????????????????????????????м?????????????????λ??
????????????????
cp /mybinlog/mysql-bin.000001 /myback/2012-12-3.19-23.full.00001
????2.2 ???????????????????????????
1.rm -rf /data/mydata/*
2.rm -rf
3./mybinlog/*
?????????mysql?????mysql
1.cd /usr/local/mysql
2../scripts/mysql_install_db --user=mysql --datadir=/data/mydata
3.rm -rf /mybinlog/* ##????????????3?????????????б??????????????????????
4.service mysqld start ##???????????????μ???????????
??????
???·???
??????????????????
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