摘要: var generic_pool = require('generic-pool');var pool = generic_pool.Pool({ name: 'mysql', max: 10, create: function(callback) { var Client = requ... 阅读全文
posted @ 2015-04-22 22:20 北京流浪儿 阅读(1169) 评论(0) 推荐(0) 编辑
摘要: /* hash.js */ var crypto = require('crypto');module.exports = function(){ this.encode = function(){ var algorithm = arguments[0] ? arguments[0] ... 阅读全文
posted @ 2015-04-22 22:19 北京流浪儿 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 1. 查看物理CPU的个数 #cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l2. 查看逻辑CPU的个数#cat /proc/cpuinfo |grep "processor"|wc -l3. 查看CPU是几核#cat /proc/cpui... 阅读全文
posted @ 2015-04-22 22:11 北京流浪儿 阅读(604) 评论(0) 推荐(0) 编辑
摘要: ssh 用户名@ip#远程指定管理指定Linux服务器,连接时会生成公钥scp [-r] 用户名@ip:远程路径 本地路径#下载文件本机是 192.168.0.252,从253上下载文件scp -r root@192.168.0.253/root/123 /rootscp [-r] 本地文件 用户名... 阅读全文
posted @ 2015-04-22 08:37 北京流浪儿 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 下面分别创建三张表,并分别插入1W条简单的数据用来测试,详情如下:[1] test_a 有主键但无索引CREATE TABLE `test_a` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(100) NOT NUL... 阅读全文
posted @ 2015-04-22 08:36 北京流浪儿 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1、注意:在同步之前一定要进行授权操作给从服务器grant all slave on *.* touser@192.168.1.2identified by 'pass'查看binlogshow master status;清除binlogreset master;2、一般主服务器进行 增、删、改,... 阅读全文
posted @ 2015-04-22 08:35 北京流浪儿 阅读(180) 评论(0) 推荐(0) 编辑