10 2016 档案

摘要:RedHat Enterprise Linux 6.4-x86_64 md5:467B53791903F9A0C477CBB1B24FFD1F 这是下载地址:http://pan.baidu.com/s/1bniVAMj第一步下载相关安装包可以通过http://mirrors.163.com... 阅读全文
posted @ 2016-10-31 15:08 czcb 阅读(185) 评论(0) 推荐(0) 编辑
摘要:14.5.5.3 How to Minimize and Handle Deadlocks 如何减少和处理死锁这个部分建立在概念信息关于deadlocks 在章节 14.5.5.2, “Deadlock Detection and Rollback”. 它解释了如何组织数据库操作来减少死锁和随... 阅读全文
posted @ 2016-10-31 11:10 czcb 阅读(178) 评论(0) 推荐(0) 编辑
摘要:14.5.5.2 Deadlock Detection and Rollback Deadlock 检测和回滚InnoDB 自动检测事务死锁和回滚一个事务InnoDB 尝试挑选小的事务来回滚,事务的大小是有 rows inserted, updated, or deleted.的数量决定的In... 阅读全文
posted @ 2016-10-31 10:25 czcb 阅读(203) 评论(0) 推荐(0) 编辑
摘要:14.5.5.1 An InnoDB Deadlock Example 一个InnoDB 死锁实例下面的例子演示了一个错误可以发生当一个lock 请求会导致一个死锁,例子设计2个客户端,A和B:Jekins:/root# mysql -uroot -p1234567 -e"SHOW ENGIN... 阅读全文
posted @ 2016-10-31 10:10 czcb 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-10-29 08:57 czcb 阅读(114) 评论(0) 推荐(0) 编辑
摘要:[root@dr-mysql01 Weixin]# find . -type f | xargs grep -l 'return $self->display'./Friend.pm./User.pm user是指你自己 friend是指你通讯录里的好友 阅读全文
posted @ 2016-10-28 20:34 czcb 阅读(291) 评论(0) 推荐(0) 编辑
摘要:14.5.5 Deadlocks in InnoDB14.5.5.1 An InnoDB Deadlock Example14.5.5.2 Deadlock Detection and Rollback14.5.5.3 How to Minimize and Handle Deadlocks死锁... 阅读全文
posted @ 2016-10-28 18:04 czcb 阅读(202) 评论(0) 推荐(0) 编辑
摘要:14.5.4 Phantom Rows 幻影行所谓的幻读问题发生在一个事务 当相同的查询产生不同的结果集在不同的时间。例如,如果一个SELECT 是执行2次,但是第2次返回的时间不第一次返回不同,行是变换的记录。假设有一个索引是在child 表的id 列,需要读和锁定表的所有的记录 Id值大于1... 阅读全文
posted @ 2016-10-28 17:24 czcb 阅读(144) 评论(0) 推荐(0) 编辑
摘要:use DBI;my $dbUser='DEVOPS';my $user="root";my $passwd="kjk123123";my @arr2="";my $dbh = DBI->connect("dbi:mysql:database=DEVOPS;host=192.168.11.18... 阅读全文
posted @ 2016-10-28 16:24 czcb 阅读(171) 评论(0) 推荐(0) 编辑
摘要:下载cpanmwget http://xrl.us/cpanm --no-check-certificate -O /sbin/cpanm && chmod +x /sbin/cpanmcentos6.5:/root/mojo#cpanm https://cpan.metacpan.org... 阅读全文
posted @ 2016-10-28 15:54 czcb 阅读(161) 评论(0) 推荐(0) 编辑
摘要:14.5.3 Locks Set by Different SQL Statements in InnoDB 通过不同的SQL语句设置的锁 在InnoDB中一个锁定读, 一个UPDATE 或者一个DELETE 通常设置record locks 在每个Index record 他不管是否有WHER... 阅读全文
posted @ 2016-10-28 13:15 czcb 阅读(123) 评论(0) 推荐(0) 编辑
摘要:?INSERT sets an exclusive lock on the inserted row. This lock is an index-record lock, not a next-key lock (that is, there is no gap lock) and does ... 阅读全文
posted @ 2016-10-28 11:41 czcb 阅读(103) 评论(0) 推荐(0) 编辑
摘要:The locks are normally next-key locks that also block inserts into the “gap” immediately before the record. 这句话怎么理解:select @@tx_isolation; 第一种情况 更新列... 阅读全文
posted @ 2016-10-28 10:43 czcb 阅读(153) 评论(0) 推荐(0) 编辑
摘要:use Net::Ping; $p = Net::Ping->new("icmp"); while (1==1){ open (LIST,") {chomp; my $host=$_; if ($p->ping($host)) {print "$host is alive\n";} else {... 阅读全文
posted @ 2016-10-27 17:34 czcb 阅读(109) 评论(0) 推荐(0) 编辑
摘要:1.zabbix 服务端安装,监控jmx 需要--enable-javazabbix 客户端不需要 --enable-java2.zabbix_server端安装jdk安装jdk[root@nginx tmp]# tar xf jdk-7u9-linux-x64.tar.gz -C /usr/l... 阅读全文
posted @ 2016-10-27 15:26 czcb 阅读(213) 评论(0) 推荐(0) 编辑
摘要:trends_uint.ibdhistoryhistory_unittrends CREATE TABLE `trends` ( `itemid` bigint(20) unsigned NOT NULL, `clock` int(11) NOT NULL DEFAULT '0', `nu... 阅读全文
posted @ 2016-10-27 14:47 czcb 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-10-27 13:05 czcb 阅读(324) 评论(0) 推荐(0) 编辑
摘要:数据采集的工作模式可以分为被动模式(服务器端到客户端采集数据)主动模式(客户端主动上报数据到服务器端)服务器配置:DBHost=192.168.32.55DBName= zabbixDBUser=zabbixuserDBPassword=zabbixpassDBSocket=/data01/my... 阅读全文
posted @ 2016-10-27 12:47 czcb 阅读(176) 评论(0) 推荐(0) 编辑
摘要:数据采集的工作模式可以分为被动模式(服务器端到客户端采集数据)主动模式(客户端主动上报数据到服务器端)服务器配置:DBHost=192.168.32.55DBName= zabbixDBUser=zabbixuserDBPassword=zabbixpassDBSocket=/data01/my... 阅读全文
posted @ 2016-10-26 21:12 czcb 阅读(176) 评论(0) 推荐(0) 编辑
摘要:jrhmpt01:/root# rpm -qa | grep -i networkNetworkManager-glib-0.8.1-99.el6.x86_64system-config-network-tui-1.6.0.el6.2-1.el6.noarchglib-networking-2.... 阅读全文
posted @ 2016-10-26 19:07 czcb 阅读(211) 评论(0) 推荐(0) 编辑
摘要:1、为DVD创建一个挂载目录[root@localhost ~]# mkdir /media/CentOS2、在Linux下挂载CentOS DVD(虚拟机挂载DVD不说了,应该都会)[root@localhost ~]# mount -t auto /dev/cdrom /media/Cent... 阅读全文
posted @ 2016-10-26 14:11 czcb 阅读(140) 评论(0) 推荐(0) 编辑
摘要:public function rangeIndex(){ $start= explode(".",$_GET['startIp']); $startIp=$start[count($start)-1]; $stop= explode(".",$_GET['stopIp']); ... 阅读全文
posted @ 2016-10-25 09:33 czcb 阅读(84) 评论(0) 推荐(0) 编辑
摘要:.content{ height: 100%;}.con{ border: 1px solid #eeeeee; display: inline-block; width:86.8%; ##修改这里 height: 100%;} 阅读全文
posted @ 2016-10-24 19:42 czcb 阅读(85) 评论(0) 推荐(0) 编辑
摘要:demo:/var/www/DEVOPS# vim ./Home/Tpl/Equipment/rangeIndex.html 运维平台 demo:/var/www/DEVOPS/Public/Css/Equipment# lsa... 阅读全文
posted @ 2016-10-24 18:54 czcb 阅读(109) 评论(0) 推荐(0) 编辑
摘要:tomcat access日志:{ "@version" => "1", "@timestamp" => "2016-10-22T12:58:07.000Z", "path" => "/data01/applog_backup... 阅读全文
posted @ 2016-10-22 21:04 czcb 阅读(840) 评论(0) 推荐(0) 编辑
摘要:Locks Set by Different SQL Statements in InnoDBIf you have no indexes suitable for your statement and MySQL must scan the entire table to process th... 阅读全文
posted @ 2016-10-22 16:25 czcb 阅读(303) 评论(0) 推荐(0) 编辑
摘要:server { listen 8001; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; ... 阅读全文
posted @ 2016-10-22 09:32 czcb 阅读(208) 评论(0) 推荐(0) 编辑
摘要:| test100 | CREATE TABLE `test100` ( `sn` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增编号', `phoneNo` int(11) DEFAULT NULL, `channelType` int(11) D... 阅读全文
posted @ 2016-10-21 17:16 czcb 阅读(165) 评论(0) 推荐(0) 编辑
摘要:产品公告查询接口管理 查询产品公告详情根据body的内容 查找h2标签的@class="subtit... 阅读全文
posted @ 2016-10-21 15:35 czcb 阅读(204) 评论(0) 推荐(0) 编辑
摘要:In InnoDB, the records in non-clustered indexes (also called secondary indexes) contain the primary key value for the row. 在InnoDB,记录在 non-cluster... 阅读全文
posted @ 2016-10-21 14:13 czcb 阅读(109) 评论(0) 推荐(0) 编辑
摘要:14.5.2.4 Locking Reads 锁定读:如果你查询数据然后插入或者修改相关数据在相同的事务里, 常规的SELECT 语句不能给予足够的保护。其他事务可以修改或者删除你刚查询相同的记录,InnoDB 支持2个锁定读的类型提供额外的安全:/*******************测试M... 阅读全文
posted @ 2016-10-21 13:55 czcb 阅读(100) 评论(0) 推荐(0) 编辑
摘要:[root@wx03 mojo]# cat a1.pl use Digest::MD5;my $md5 = Digest::MD5->new;$md5->add(1234567);print $md5->hexdigest."\n";[root@wx03 mojo]# perl a1.pl fc... 阅读全文
posted @ 2016-10-21 12:41 czcb 阅读(216) 评论(0) 推荐(0) 编辑
摘要:mysql> desc information_schema.innodb_trx -> ;+----------------------------+---------------------+------+-----+---------------------+-------+| F... 阅读全文
posted @ 2016-10-21 10:24 czcb 阅读(1152) 评论(0) 推荐(0) 编辑
摘要:mysql> desc test200;+---------------+----------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+---------... 阅读全文
posted @ 2016-10-21 09:37 czcb 阅读(129) 评论(0) 推荐(0) 编辑
摘要:14.5.2.4 Locking Reads 锁定读:如果你查询数据然后插入或者修改相关数据在相同的事务里, 常规的SELECT 语句不能给予足够的保护。其他事务可以修改或者删除你刚查询相同的记录,InnoDB 支持2个锁定读的类型提供额外的安全:/*******************测试M... 阅读全文
posted @ 2016-10-20 16:19 czcb 阅读(237) 评论(0) 推荐(0) 编辑
摘要:14.5.2.3 Consistent Nonlocking Reads 一致性非锁定读一致性读意味着 InnoDB 使用多版本来实现一个查询数据库的快照在某个时间点。查看看到的事务做出的改变被提交了在那个时间点前, 随后没有改变或者没有提交的事务。这个例外是这个规则是查询看到的改变通过早期的语... 阅读全文
posted @ 2016-10-20 15:40 czcb 阅读(159) 评论(0) 推荐(0) 编辑
摘要:14.5.2.2 autocommit, Commit, and Rollback 在InnoDB,所有的用户活动发生在一个事务里, 如果自动提交模式是启用的,每个SQL语句形成一个单独的事务。默认情况下, MySQL开启一个session用于每个新的连接在自动提交启用的情况下,因此MySQL ... 阅读全文
posted @ 2016-10-20 15:01 czcb 阅读(157) 评论(0) 推荐(0) 编辑
摘要:14.5.2 InnoDB Transaction Model14.5.2.1 Transaction Isolation Levels14.5.2.2 autocommit, Commit, and Rollback14.5.2.3 Consistent Nonlocking Reads14.... 阅读全文
posted @ 2016-10-20 14:05 czcb 阅读(158) 评论(0) 推荐(0) 编辑
摘要:| test100 | CREATE TABLE `test100` ( `sn` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增编号', `phoneNo` int(11) DEFAULT NULL, `channelType` int(11) D... 阅读全文
posted @ 2016-10-20 12:44 czcb 阅读(151) 评论(0) 推荐(0) 编辑
摘要:就是10W记录比如全表返回1行 Mysql显示可能是10W oracle是1行 mysql 是预估需要扫描的记录 Oracle 是预估返回的记录 阅读全文
posted @ 2016-10-20 10:47 czcb 阅读(70) 评论(0) 推荐(0) 编辑
摘要:CREATE TABLE `test100` ( `sn` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增编号', `phoneNo` int(11) , `channelType` int(11) DEFAULT NULL COMMENT '通道识... 阅读全文
posted @ 2016-10-20 10:03 czcb 阅读(127) 评论(0) 推荐(0) 编辑
摘要:+---------+-----------------------------------------------------------------------------------------------------------------------------------------... 阅读全文
posted @ 2016-10-20 09:48 czcb 阅读(126) 评论(0) 推荐(0) 编辑
摘要:If one session has a shared or exclusive lock on record R in an index, another session cannot insert a new index record in the gap immediately befor... 阅读全文
posted @ 2016-10-19 20:12 czcb 阅读(83) 评论(0) 推荐(0) 编辑
摘要:Session 1:mysql> start transaction;Query OK, 0 rows affected (0.00 sec)mysql> select * from SmsTest where phoneNo between 30 and 40 for update;+----... 阅读全文
posted @ 2016-10-19 19:54 czcb 阅读(169) 评论(0) 推荐(0) 编辑
摘要:Next-Key LocksA next-key lock is a combination of a record lock on the index record and a gap lock on the gap before the index record. 是一个记录锁在索引记录上和... 阅读全文
posted @ 2016-10-19 17:44 czcb 阅读(144) 评论(0) 推荐(0) 编辑
摘要:Gap Locks 区间锁1.区间锁不能用于语句锁定记录使用一个唯一索引来搜索一个唯一的记录2.READ COMMITTED 没有区间锁区间锁是一个锁在一个在index记录间的区间,或者一个lock 在gap 在第一个前或者最后一个index recoed 之后,比如,SELECT c1 FOR... 阅读全文
posted @ 2016-10-19 17:09 czcb 阅读(404) 评论(0) 推荐(0) 编辑
摘要:InnoDB行锁是通过索引上的索引项来实现的,这一点MySQL与Oracle不同,后者是通过在数据中对相应数据行加锁来实现的。InnoDB这种行锁实现特点意味者:只有通过索引条件检索数据,InnoDB才会使用行级锁,否则,InnoDB将使用表锁! 在实际应用中,要特别注意InnoDB行锁的... 阅读全文
posted @ 2016-10-19 15:58 czcb 阅读(228) 评论(0) 推荐(0) 编辑
摘要:Record Locks记录锁:记录锁是一个锁在一个Index记录上,比如SELECT c1 FOR UPDATE FROM t WHERE c1 = 10;阻止任何其他事务inserting, updating, or deleting t.c1只为10的记录记录锁总是lock index记录... 阅读全文
posted @ 2016-10-19 15:08 czcb 阅读(132) 评论(0) 推荐(0) 编辑
摘要:Intention Locks 意向锁InnoDB 支持多颗粒度锁定允许row-level locks和锁整个表共存。为了使锁在多个颗粒级别实现, 额外类型的锁被称为意向锁是被使用。. Intention lock 意向锁是表级锁 在InnoDB 表明锁的类型(共享或者排它) 一个事务随后需要用... 阅读全文
posted @ 2016-10-19 15:06 czcb 阅读(293) 评论(0) 推荐(0) 编辑
摘要:14.5 InnoDB Locking and Transaction Model InnoDB 锁和事务模型14.5.1 InnoDB Locking14.5.2 InnoDB Transaction Model14.5.3 Locks Set by Different SQL Stateme... 阅读全文
posted @ 2016-10-19 14:14 czcb 阅读(249) 评论(0) 推荐(0) 编辑
摘要:SELECT r.trx_id waiting_trx_id, r.trx_mysql_thread_id waiting_thread, r.trx_query waiting_query, b.trx_id blocking_trx_id, b.trx_mysql_thread_... 阅读全文
posted @ 2016-10-19 13:18 czcb 阅读(126) 评论(0) 推荐(0) 编辑
摘要:demo:/root# mysql -uroot -pkjk7787czcb --socket=/data01/mysql/mysql.sock -e"show processlist" Warning: Using a password on the command line interfac... 阅读全文
posted @ 2016-10-19 13:04 czcb 阅读(405) 评论(0) 推荐(0) 编辑
摘要:14.4.5 System Tablespace 系统表空间InnoDB 系统表空间包含InnoDB 数据目录(元数据 用于InnoDB相关对象)和是存储区域用于doublewrite buffer, the change buffer, and undo logs. 系统表空间也包含表和索引数... 阅读全文
posted @ 2016-10-19 09:07 czcb 阅读(276) 评论(0) 推荐(0) 编辑
摘要:14.4.4 Redo Log Bufferredo log buffer 是内存区域持有数据被写入到redo log.Redo log buffer size 是通过 innodb_log_buffer_size 配置选项定义的mysql> show variables like '%inno... 阅读全文
posted @ 2016-10-19 09:01 czcb 阅读(156) 评论(0) 推荐(0) 编辑
摘要:14.4.3 Adaptive Hash Index 自适应hash index自适应hash index(AHI) 让InnoDB 执行更像内存数据库在系统使用合适的负载组合和足够的内存用于Buffer pool,基于观察到的搜索模式, MySQL 创建一个hash index 使用一个in... 阅读全文
posted @ 2016-10-18 17:48 czcb 阅读(271) 评论(0) 推荐(0) 编辑
摘要:14.4.2 Change Bufferchange buffer 是一个特殊的数据结构 用于cahce 改变的secondary index pages当被影响的pages 不在buffer pool里,buffered changes, 可能是由于 INSERT, UPDATE, or DE... 阅读全文
posted @ 2016-10-18 17:24 czcb 阅读(272) 评论(0) 推荐(0) 编辑
摘要:14.4.1 Buffer Poolbuffer pool 是一个主人的内存区域 InnoDB caches 表和index 数据。buffer pool 允许经常访问的数据直接从内存里处理,加快了处理。在专用的数据库服务器上,最多80%的物理内存可以分配给InnoDB buffer pool... 阅读全文
posted @ 2016-10-18 16:47 czcb 阅读(140) 评论(0) 推荐(0) 编辑
摘要:14.3 InnoDB Multi-Versioning InnoDB 多版本InnoDB 是一个多版本的存储引擎,它保持信息关于改变的数据老版本的信息,为了支持事务功能比如并发和回滚。这些信息是存储在表空间在称为一个rollback segment(Oracle类似的数据结构).InnoDB ... 阅读全文
posted @ 2016-10-18 16:37 czcb 阅读(129) 评论(0) 推荐(0) 编辑
摘要:14.2 InnoDB and the ACID ModelACID 模型是一组数据库设计原则,强调可靠性方面对于商业数据和关键人物。MySQL 包含组件比如InnoDB存储引擎坚持ACID 模型,这样数据不会被破坏和结果不受特殊条件的弯曲 比如软件crashes 和硬件故障当你依靠ACID兼容... 阅读全文
posted @ 2016-10-18 12:41 czcb 阅读(109) 评论(0) 推荐(0) 编辑
摘要:14.1.3 Checking InnoDB Availability 14.1.3 检查InnoDB 可用性:确定是否你的server 支持InnoDB:1.执行命令 SHOW ENGINES; 查看所有不同的MySQL 存储引擎mysql> SHOW ENGINES;+-----------... 阅读全文
posted @ 2016-10-17 17:17 czcb 阅读(79) 评论(0) 推荐(0) 编辑
摘要:14.1.2 Best Practices for InnoDB Tables InnoDB表最佳实践:这个章节描述使用InnoDB表最佳实践:1.指定一个主键用于每个表使用最多查询的列或者多列,或者一个自动递增值 如果没有明显的主键列2.使用关联无论数据是从多个表拉出基于表示ID只从那些表。对... 阅读全文
posted @ 2016-10-17 16:59 czcb 阅读(78) 评论(0) 推荐(0) 编辑
摘要:14.1.1 Benefits of Using InnoDB Tables14.1.2 Best Practices for InnoDB Tables14.1.3 Checking InnoDB Availability14.1.4 Testing and Benchmarking with... 阅读全文
posted @ 2016-10-17 16:26 czcb 阅读(152) 评论(0) 推荐(0) 编辑
摘要:7.5.1 Point-in-Time Recovery Using Event Times 使用Event Times 基于时间点恢复表明开始和结束时间用于恢复, 指定 --start-datetime and --stop-datetime 选项用于mysqlbinlog,在日期格式下。作... 阅读全文
posted @ 2016-10-17 13:56 czcb 阅读(101) 评论(0) 推荐(0) 编辑
摘要:7.5 Point-in-Time (Incremental) Recovery Using the Binary Log 使用binay log 基于时间点恢复7.5.1 Point-in-Time Recovery Using Event Times7.5.2 Point-in-Time ... 阅读全文
posted @ 2016-10-17 13:37 czcb 阅读(98) 评论(0) 推荐(0) 编辑
摘要:7.4 Using mysqldump for Backups 使用mysqldump 用于备份:7.4.1 Dumping Data in SQL Format with mysqldump7.4.2 Reloading SQL-Format Backups7.4.3 Dumping Dat... 阅读全文
posted @ 2016-10-17 13:05 czcb 阅读(114) 评论(0) 推荐(0) 编辑
摘要:7.3.2 Using Backups for Recovery 使用备份用于恢复现在,假设我们有一个灾难性的crash 在星期三上午8点。需要恢复从备份恢复,为了恢复,我们首选需要恢复最近的全备份(星期日下午1点)全备份是一个SQL语句的集合,因此恢复它很容易-- Position to st... 阅读全文
posted @ 2016-10-17 12:24 czcb 阅读(100) 评论(0) 推荐(0) 编辑
摘要:7.3 Example Backup and Recovery Strategy 备份和恢复策略实例7.3.1 Establishing a Backup Policy7.3.2 Using Backups for Recovery7.3.3 Backup Strategy Summary这个章... 阅读全文
posted @ 2016-10-17 11:13 czcb 阅读(110) 评论(0) 推荐(0) 编辑
摘要:Sesssion 1:mysql> select @@tx_isolation;+-----------------+| @@tx_isolation |+-----------------+| REPEATABLE-READ |+-----------------+1 row in set ... 阅读全文
posted @ 2016-10-17 09:20 czcb 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-10-16 20:17 czcb 阅读(62) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/reblue520/article/details/50516855 阅读全文
posted @ 2016-10-15 12:27 czcb 阅读(68) 评论(0) 推荐(0) 编辑
摘要:显然 RR 支持 gap lock(next-key lock),而RC则没有gap lock。因为MySQL的RR需要gap lock来解决幻读问题。而RC隔离级别则是允许存在不可重复读和幻读的。所以RC的并发一般要好于RR;RR 和RC 幻读问题:幻读:同一个事务中多次执行同一个select... 阅读全文
posted @ 2016-10-14 21:54 czcb 阅读(601) 评论(0) 推荐(0) 编辑
摘要:1. 数据库事务ACID特性数据库事务的4个特性:原子性(Atomic): 事务中的多个操作,不可分割,要么都成功,要么都失败; All or Nothing.一致性(Consistency): 事务操作之后, 数据库所处的状态和业务规则是一致的; 比如a,b账户相互转账之后,总金额不变;隔离性... 阅读全文
posted @ 2016-10-14 21:42 czcb 阅读(611) 评论(0) 推荐(0) 编辑
摘要:7.2 Database Backup Methods 数据备份方法:本节总结了一些常用的备份方法:使用MySQL Enterprise Backup 进行Hot Backup MySQL Enterprise Edition 的用户可以使用 MySQL Enterprise Backup 产... 阅读全文
posted @ 2016-10-14 17:24 czcb 阅读(144) 评论(0) 推荐(0) 编辑
摘要:7.1 Backup and Recovery Types 备份和恢复类型这个章节描述 不同备份类型的特点:物理(raw)与逻辑备份物理备份有raw 副本组成,存储数据库内容,这种类型的备份是适用于大的,重要的数据库 需要被快速恢复当发生为时逻辑备份保存的信息便是为逻辑数据库结构(CREATE ... 阅读全文
posted @ 2016-10-14 15:45 czcb 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Chapter 7 Backup and Recovery 备份和恢复:Table of Contents 7.1 Backup and Recovery Types7.2 Database Backup Methods7.3 Example Backup and Recovery St... 阅读全文
posted @ 2016-10-14 14:03 czcb 阅读(122) 评论(0) 推荐(0) 编辑
摘要:mysqldump -uroot -p'xxx' -R --single-transaction --master-data=2 zjzc>$TODAY_DIR/zjzc/zjzc_${TODAY_DIR}.sqlmysqldump -uxxx -p --single-transaction ... 阅读全文
posted @ 2016-10-14 13:35 czcb 阅读(142) 评论(0) 推荐(0) 编辑
摘要:# User@Host: zjzc_app[zjzc_app] @ [10.171.243.55] Id: 1621705# Query_time: 10.666552 Lock_time: 0.000392 Rows_sent: 15 Rows_examined: 24829551SE... 阅读全文
posted @ 2016-10-13 22:21 czcb 阅读(531) 评论(0) 推荐(0) 编辑
摘要:uat-prx02:/root# cat a1.pl my $str="123";if ($str =~/(abc)*/){print "111111111\n"};uat-prx02:/root# perl a1.pl 111111111匹配 0 次或多次 abc 字符串uat-prx02:/... 阅读全文
posted @ 2016-10-13 22:15 czcb 阅读(119) 评论(0) 推荐(0) 编辑
摘要:[root@backoffice01 ~]# cat a1.pl my $_="aa2bb3cc";if ($_=~/aa$\n^2bb\n3cc/){print "1111111111\n"};if ($_=~/aa\n^2bb\n3cc/m){print "2222222222\n"};[r... 阅读全文
posted @ 2016-10-13 21:17 czcb 阅读(127) 评论(0) 推荐(0) 编辑
摘要:sort_buffer_size:每个session 必须执行一个排序 分配一个 这个大小的buffer.sort_buffer_size 不特定的对于任何存储引擎适用于一般的优化方式。sort_buffer_size的最小值 必须足够大 容纳15个元组在sort buffer.同时, 增加 ... 阅读全文
posted @ 2016-10-13 16:22 czcb 阅读(377) 评论(0) 推荐(0) 编辑
摘要:filter { grok { match => [ "message" , "\s*%{IPORHOST:clientip}\s+\-\s+\-\s+\[%{HTTPDATE:time}\]\s+\"%{WORD:verb}\s+(?(\S+))\?... 阅读全文
posted @ 2016-10-13 15:21 czcb 阅读(85) 评论(0) 推荐(0) 编辑
摘要:Codec plugins ? multilinemultiline codec 会折叠多行消息,合并它们到一个事件这个codec 原始的目的是允许 连接多行信息从文件到一个单独的事件。比如, 连接Java 异常和stacktrace 消息到一个单独的事件配置看起来像这样:input { st... 阅读全文
posted @ 2016-10-13 15:09 czcb 阅读(138) 评论(0) 推荐(0) 编辑
摘要:# User@Host: zjzc_app[zjzc_app] @ [10.171.243.55] Id: 1621705# Query_time: 10.666552 Lock_time: 0.000392 Rows_sent: 15 Rows_examined: 24829551SE... 阅读全文
posted @ 2016-10-13 14:07 czcb 阅读(200) 评论(0) 推荐(0) 编辑
摘要:input { file { type => "zj_api" path => ["/data01/applog_backup/zjzc_log/zj-api*catalina*"] code... 阅读全文
posted @ 2016-10-13 13:17 czcb 阅读(440) 评论(0) 推荐(0) 编辑
摘要:binlog 日志格式:use `zjzc`/*!*/;SET TIMESTAMP=1476326343/*!*/;UPDATE `ProductAccess` pa SET pa.accessType =1 WHERE pa.productSn IN(SET TIMESTAMP=147632... 阅读全文
posted @ 2016-10-13 11:10 czcb 阅读(163) 评论(0) 推荐(0) 编辑
摘要:用/s 来匹配任意字符 默认情况下,点号(.)无法匹配换行符,这对大多数单行匹配的情况是合适的。 . 圆点用于匹配除换行符外的任何单个字符 + 意味着一个或多个相同的字符 .+ 匹配任意单个字符至少一次 .* 所有任意数量字符。与前一字符结合,可不出现字符 ... 阅读全文
posted @ 2016-10-13 09:40 czcb 阅读(166) 评论(0) 推荐(0) 编辑
摘要:在和 codec/multiline 搭配使用的时候,需要注意一个问题,grok 正则和普通正则一样,默认是不支持匹配回车换行的。就像你需要 =~ //m 一样也需要单独指定,具体写法是在表达式开始位置加 (?m) 标记。\s 空格,和 [\n\t\r\f] 语法一样 (\s*\S+\s*).... 阅读全文
posted @ 2016-10-12 23:13 czcb 阅读(482) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-10-12 22:39 czcb 阅读(117) 评论(0) 推荐(0) 编辑
摘要:filter { multiline { pattern => "^\s+%{TIMESTAMP_ISO8601}" negate=>true what=>"previous" } 这个插件很简单,就是把当前行的数据添加到前面一行后面,直到新进的当前行匹配^\[正则... 阅读全文
posted @ 2016-10-12 21:50 czcb 阅读(167) 评论(0) 推荐(0) 编辑
摘要:8.2.1.15 ORDER BY Optimization ORDER BY 优化在一些情况下, MySQL 可以使用一个索引来满足一个ORDER BY 子句不需要做额外的排序index 可以用于即使ORDER BY 不精确的匹配index,只要所有未使用的索引的部分和所有额外的ORDER ... 阅读全文
posted @ 2016-10-12 14:10 czcb 阅读(89) 评论(0) 推荐(0) 编辑
摘要:mysql> show variables like '%undo%';+-------------------------+-------+| Variable_name | Value |+-------------------------+-------+| innod... 阅读全文
posted @ 2016-10-12 10:04 czcb 阅读(120) 评论(0) 推荐(0) 编辑
摘要:System Tablespace 数据文件配置;mysql> show variables like '%innodb_data_file_path%';+-----------------------+------------------------+| Variable_name ... 阅读全文
posted @ 2016-10-11 20:51 czcb 阅读(155) 评论(0) 推荐(0) 编辑
摘要:mysql> show variables like '%innodb_log_file_size%';+----------------------+-----------+| Variable_name | Value |+----------------------+... 阅读全文
posted @ 2016-10-11 20:16 czcb 阅读(124) 评论(0) 推荐(0) 编辑
摘要:8.2.1.13 Multi-Range Read Optimization 多个range 读优化读记录使用一个range scan 在一个secondary index 可以导致很多的随机磁盘访问 对于基表当表是大的不是存储在storage 引擎的cache里。 使用Disk-Sweep M... 阅读全文
posted @ 2016-10-11 17:27 czcb 阅读(200) 评论(0) 推荐(0) 编辑
摘要:8.2.1.10 Nested-Loop Join Algorithms 嵌套循环 关联算法:MySQL 执行关联在表之间使用一个嵌套循环算法或者变种Nested-Loop Join Algorithm 嵌套循环算法:一个简单的嵌套循环关联(NLJ)算法读取记录从第一个表在一个循环 一次一跳,传... 阅读全文
posted @ 2016-10-11 16:25 czcb 阅读(181) 评论(0) 推荐(0) 编辑
摘要:8.2.1.8 IS NULL Optimization NULL 优化:Oracle 对待null值:SQL> create table t100(id int,name char(10));表已创建。begin for i in 1 .. 1000 loop insert int... 阅读全文
posted @ 2016-10-11 14:54 czcb 阅读(117) 评论(0) 推荐(0) 编辑
摘要:8.2.1.7 Use of Index Extensions 使用索引扩展InnoDB 自动扩展每个secondary index 通过添加primary key columns to it,考虑表定义如下:CREATE TABLE t1 ( i1 INT NOT NULL DEFAULT ... 阅读全文
posted @ 2016-10-11 14:07 czcb 阅读(100) 评论(0) 推荐(0) 编辑
摘要:8.2.1.5 Engine Condition Pushdown Optimization 引擎条件下推优化这种优化改善了直接比较在一个非索引列和一个常量比较的效率。在这种情况下, 条件是 下推到存储引擎用于评估,这个优化智能用于NDB存储引擎MySQL 集群,这个优化可以消除需要发送非匹... 阅读全文
posted @ 2016-10-11 11:20 czcb 阅读(139) 评论(0) 推荐(0) 编辑
摘要:8.2.1.5 Engine Condition Pushdown Optimization 引擎条件下推优化这种优化改善了直接比较在一个非索引列和一个常量比较的效率。在这种情况下, 条件是 下推到存储引擎用于评估,这个优化智能用于NDB存储引擎MySQL 集群,这个优化可以消除需要发送非匹... 阅读全文
posted @ 2016-10-11 10:50 czcb 阅读(122) 评论(0) 推荐(0) 编辑
摘要:stop() { echo -n $"Shutting down system logger: " killproc -p "${PIDFILE}" -d 30 $exec RETVAL=$? echo [ $RETVAL -... 阅读全文
posted @ 2016-10-10 16:32 czcb 阅读(1647) 评论(1) 推荐(0) 编辑
摘要:reopenOnTruncate [on/off] (requires v8.16.0+)Default: off这是一个实验性的东西告诉rsyslog 重新input file 当它被truncated(inode 没有改变 但是文件大小是小于当前偏移量在内存里)input(type="imf... 阅读全文
posted @ 2016-10-10 16:04 czcb 阅读(474) 评论(0) 推荐(0) 编辑
摘要:$InputFilePersistStateInterval 1Specifies how often the state file shall be written when processing the input file. The default value is 0, which me... 阅读全文
posted @ 2016-10-10 15:06 czcb 阅读(215) 评论(0) 推荐(0) 编辑
摘要:The number of seconds the server waits for activity on a noninteractive connection before closing it. mysql server 等待活动的秒数在一个非交互式的连接在关闭前,超出这个时间就会关闭连... 阅读全文
posted @ 2016-10-08 07:23 czcb 阅读(145) 评论(0) 推荐(0) 编辑
摘要:[root@wx03 mojo]# cat relink.pl use Mojolicious::Lite;use JSON qw/encode_json decode_json/;use Encode;no strict;no warnings;use JSON;use POSIX;use J... 阅读全文
posted @ 2016-10-07 19:26 czcb 阅读(124) 评论(0) 推荐(0) 编辑
摘要:如果elasticsearch 集群挂了,请勿开启Logstash 同步数据,需等待elasticsearch集群恢复后,在继续写入 阅读全文
posted @ 2016-10-02 22:44 czcb 阅读(211) 评论(0) 推荐(0) 编辑