mysql linux nosql
cocos · 共 133 篇文章
埃及CDN介绍
一、背景 因项目合作需要,准备在埃及落地国家级项目项目(MOE),其中主要功能为教育直播、点播,需要能覆盖埃及全国家,带宽TB级需求。但从目前已了解信息埃及政府无法提供本地的CDN供应商。 二、第三方云厂家支持情况 经过渠道沟通了解,海外、国内的大部分云厂家、CDN厂家对埃及国家(半沙漠国家)覆盖情况都不理想。目前盘点,已知仅akamai、cloudflare 在埃及部分城市有节点。 厂家 覆盖情况 说明 akamai 部分城市 cloudflare(CF) 部分城市 自己商务表达,埃及加速效果不理想 cloudflare 在非洲的城市节点情况: Antananarivo, MG Cairo…
2020-06-11 14:21 · 其他 · 评论(0)
微服务web开发-统一域名解决方案
一、问题背景 在之前的项目开发中,因为团队和技术限制,服务以小服务(微服务)的模式进行开发,各自服务的web端使用独立的访问域名;从用于测看,一个产品用户会点击出大量的不同域名,在统一认证和用户体验上都是一个比较糟糕的实现。基于此问题,团队考虑一个透明的将多个web站点集成在一个域名下的解决方案。 目前的域名示例: 课程:http://webfront-course.sdp.101.com/ndu/course/11600ebe-3314-4c73-93db-5c2f4583a345 培训:http://webfront-train.sdp.101.com/ndu/train/b89672d…
利用splunk分析nginx日志,分析异常状态,分析接口性能问题
一、nginx log_format log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '"$status" $host $upstream_addr $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$gzip_ratio" $request_time $bytes_sent $request_length $upstream_response_time "$http_fiddler…
2018-05-30 13:21 · 其他 · 评论(0)
用SQL找出每种类型中时间最新的前N个数据组成的集合
比如有文章表 Article(Id,Category,InsertDate) 现在要用SQL找出每种类型中时间最新的前N个数据组成的集合 SELECT A1.* FROM Article AS A1 INNER JOIN (SELECT A.Category,A.InsertDate FROM Article AS A LEFT JOIN Article AS B ON A.Category = B.Category AND A.InsertDate <= B.InsertDate GROUP BY A.Category,A.InsertDate HAVING COUNT(B.InsertD…
2012-03-23 22:46 · Mysql · 评论(0)
mongostat
flushes – this shows how many times data has been flushed to disk . MongoDB only physically writes data to disk every 60 seconds (by default). This has the effect of increasing performance but can decrease durability because a hard crash inbetween flushes will result in that data not being written,…
2012-03-23 22:38 · NoSql ,mongodb · 评论(0)
mysql select 中的escape,转义
SELECT * FROM tb1 WHERE varcharstring LIKE '%~%%' ESCAPE '~' like查询中模糊查询特殊字符,可以用escape转义
2011-10-17 16:57 · Mysql · 评论(0)
can't map file memory - mongo requires 64 bit build for larger datasets
处理一次32bit mongdb 数据超过2G问题 can't map file memory - mongo requires 64 bit build for larger datasets 生产环境下某32bit windows机器安装了mongodb,一日数据超过2G 然后,任何操作都会报错 { "assertion" : "can't map file memory - mongo requires 64 bit build for larger datasets", "assertionCode" : 10084, "errmsg" : "db assertion failure…
2011-09-15 15:58 · NoSql ,mongodb · mongodb · 评论(0)
mongodb 简单的备份
#!/bin/sh binpath="/usr/local/mongodb/bin" backpath="/data1/mongodbgwy/back" port=29017 $binpath/mongodump --port $port -o $backpath/mongodb_`date +%Y%m%d` find $backpath/* -type d -prune -mtime 30 -name mongodb* -exec rm -rf {} \;
Error moving temp DB file on the final destination: Invalid cross-device link
Error moving temp DB file on the final destination: Invalid cross-device link dbfilename /data1/redisdata/dump.rdb 路径需要同文件系统,否则无法写入dump.rdb文件 ? /** Save the DB on disk. Return REDIS_ERR on error, REDIS_OK on success */ 0405 int rdbSave(char *filename) { 0406 dictIterator *di = NULL; 0407 dictEntry …
2011-07-18 15:57 · redis · 评论(0)
SLAVEOF host port
The SLAVEOF command can change the replication settings of a slave on the fly. If a Redis server is already acting as slave, the command SLAVEOF NO ONE will turn off the replication turning the Redis server into a MASTER. In the proper form SLAVEOF hostname port will make the server a slave of the …
2011-07-18 13:54 · redis · 评论(0)
安装mysql plugin
1、安装Plugin 语法如下: INSTALL PLUGIN plugin_name SONAME 'plugin_library' 实例: Mysql>INSTALL PLUGIN Archive SONAME ‘ha_archive.so’; Mysql>INSTALL PLUGIN InnoDB SONAME ‘ha_innodb.so’; plugin_name 是在plugin声明中定义的plugin的名称,plugin名字大小写敏感可以由系统设置。plugin_library 是共享库的名字,共享库在 plugin的目录下,可能是静态或者动态库,比如:libmyplugin.s…
2011-07-18 11:03 · 评论(0)
让linux用户隶属于多个组
usermod -g 组名 用户名:更改用户所属组,是覆盖; 小写 是 覆盖 usermod -G 组名1[,组名2,……] 用户名:添加用户所属组; 大写 是添加 usermod -G 组名 用户名 类似于,Linux系统 一个组可以包含多个用户成员,反过来,一个用户也可以隶属于多个组,其中一个方法就是使用usermod -G命令来实现。在使用-g时要格外小心,因为它是覆盖,比如原来test 隶属于grp1,grp2组,你突然来一个usermod -g grp3 test,结果就是test用户只属于grp3组; 参考: chgrp 怎样把用户加入另一个组? useradd -g sirad…
2011-07-14 04:11 · Linux · 评论(0)
mysql 变量
1. 使用用户变量 可以清空MySQL 用户变量以记录结果,不必将它们保存到客户端的临时变量中。 例如,要找出价格最高或最低的物品的,其方法是: mysql> SELECT @min_price:=MIN(price),@max_price:=MAX(price) FROM shop; mysql> SELECT * FROM shop WHERE price=@min_price OR price=@max_price; +---------+--------+-------+ | article | dealer | price | +---------+--------+-------…
2011-07-13 21:45 · Mysql · 评论(0)
windows findstr
mysqldump --help | findstr defau ASSOC 显示或修改文件扩展名关联。 ATTRIB 显示或更改文件属性。 BREAK 设置或清除扩展式 CTRL+C 检查。 BOOTCFG 设置 boot.ini 文件的属性以便控制启动加载。 CACLS 显示或修改文件的访问控制列表(ACL)。 CALL 从另一个批处理程序调用这一个。 CD 显示当前目录的名称或将其更改。 CHCP 显示或设置活动代码页数。 CHDIR 显示当前目录的名称或将其更改。 CHKDSK 检查磁盘并显示状态报告。 CHKNTFS 显示或修改启动时间磁盘检查。 CLS 清除屏幕。 CMD 打开另…
2011-07-13 13:07 · windows · 评论(0)
安装DBI组件。 Can't locate DBI.pm in @INC-mysql接口
Can't locate DBI.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.…
2011-07-12 21:05 · Mysql · 评论(0)