mysql--备份篇

一启用增量备份
 1.1启用binlog
    binlog_format=mixed
   log_bin=/data/log/bin_log.log
   expire_logs_days=7
   max_binlog_size =500M
   binlog-do-db=db
 2 重启mysql服务
  查看binlog
mysql> show binary logs;
mysql> show master status ;
mysql> show binlog events in 'bin_log.000003';
  3  编写存储过程
drop procedure if exists pro_test;
CREATE DEFINER=`snowhill`@`%` PROCEDURE `pro_test`()
begin
  declare i int;
  set i=0;
  while i<100 do
      insert into T(id,name) values(i,'value');
      set i=i+1;
  end while;
  end;
call pro_test();
select * from T;
4性能测试mysqlslap
测试500并发

mysqlslap -a -c 500 -i 10 -uroot -p123456 
测试基本写入:
mysqlslap --auto-generate-sql -u root -p123456
其原理就是建一个两个字段的表,然后insert 数据测试.
 use `mysqlslap`; CREATE TABLE `t1` (intcol1 INT(32) ,charcol1 VARCHAR(128))  



posted on 2015-10-07 00:12 snowhill 阅读(208) 评论(0)  编辑 收藏 引用 所属分类: 数据库-mysql


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

导航

公告

又一年...........

留言簿(3)

随笔分类(13)

文章分类(131)

文章档案(124)

c++

java

linux

oracle

常用软件

其他

网络配置

系统安全

音乐

搜索

最新评论

阅读排行榜