02 2014 档案

摘要:官方有写:http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.htmlyum update #数据库服务器的安装 , 请自行在mysql官方找最新的rpmrpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpmyum install mysql-server 阅读全文
posted @ 2014-02-28 10:44 ifeixiang 阅读(1594) 评论(0) 推荐(0) 编辑
摘要:从Thinkphp里面抽离出来的数据库模块,感觉挺好用common.php' . $label . htmlspecialchars($output, ENT_QUOTES) . ''; } else { $output = $label . print_r($var, true); } } else { ob_start(); var_dump($var); $output = ob_get_clean(); if (!extension_loaded('xdebug')) { ... 阅读全文
posted @ 2014-02-28 10:14 ifeixiang 阅读(11930) 评论(0) 推荐(0) 编辑
摘要:方法很简单:在出现grub画面时,用上下键选中平时启动linux的那一项,然后按a键,可以进行append模式在出来的命令行等方面加上 空格 single , 这样可以进入单用户模式,再 passwd root即可有那么点危险! 阅读全文
posted @ 2014-02-26 18:03 ifeixiang 阅读(237) 评论(0) 推荐(0) 编辑
摘要:protected function getRs($id) { $db = new mysqli(C("DB_HOST"), C("DB_USER"), C("DB_PWD"), C("DB_NAME"), C("DB_PORT")); if (mysqli_connect_errno()) throw_exception(mysqli_connect_error()); $sql = "call `room_match`.`wsKocMatchLoadResultHeader`($i 阅读全文
posted @ 2014-02-22 15:58 ifeixiang 阅读(1736) 评论(0) 推荐(0) 编辑
摘要:使用select into outfile xxx , load data infile xxx例如 :SELECT * into outfile '/tmp/out.txt' FROM `db1`.`test`;load data infile '/tmp/out.txt' into table `db2`.`test`;速度非常快,比insert快N+++倍 阅读全文
posted @ 2014-02-20 08:57 ifeixiang 阅读(466) 评论(0) 推荐(0) 编辑
摘要:android仿微信http://www.oschina.net/code/snippet_253900_33261 阅读全文
posted @ 2014-02-19 22:49 ifeixiang 阅读(133) 评论(0) 推荐(0) 编辑
摘要:优化 lemp服务器 ,参考文章:nginx编译优化:http://www.howtocn.org/nginx:%E9%85%8D%E7%BD%AE%E4%B8%80%E4%B8%AA%E9%AB%98%E6%80%A7%E8%83%BD%E7%9A%84nginx_fastcgi%E6%9C%8D%E5%8A%A1%E5%99%A8http://ixdba.blog.51cto.com/2895551/803475php,php-fpm优化 阅读全文
posted @ 2014-02-19 18:31 ifeixiang 阅读(135) 评论(0) 推荐(0) 编辑
摘要:——先抄回来~~~首先看一下分页的基本原理:mysql> explain SELECT * FROM message ORDER BY id DESC LIMIT 10000, 20G***************** 1. row **************id: 1select_type: SIMPLEtable: messagetype: indexpossible_keys: NULLkey: PRIMARYkey_len: 4ref: NULLrows: 10020Extra:1 row in set (0.00 sec)limit 10000,20的意思扫描满足条件的100 阅读全文
posted @ 2014-02-19 10:27 ifeixiang 阅读(573) 评论(0) 推荐(0) 编辑
摘要:参考文章:http://showerlee.blog.51cto.com/2047005/1189484监控mysql,php-fpm,nginxhttp://www.zrwm.com/?p=6360https://github.com/jizhang/zabbix-templateszabbix的安装可以使用官方的yum安装;先安装epel的源:rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm #官方的,用不了#用这个rpm -Uvh http://dl.fedora. 阅读全文
posted @ 2014-02-18 15:30 ifeixiang 阅读(1287) 评论(0) 推荐(0) 编辑
摘要:测试团队:http://www.taobaotesting.com/淘宝UED团队:http://ued.taobao.org/blog/阿里妈妈UED团队:http://ued.alimama.com/阿里数据平台:http://www.alidata.org/archives阿里巴巴数据库团队:http://www.taobaodba.com/阿里中间件团队:http://jm.taobao.org/国内顶尖团队的经验,值得学习 阅读全文
posted @ 2014-02-18 13:56 ifeixiang 阅读(20783) 评论(1) 推荐(1) 编辑
摘要:安装方法:wget http://pecl.php.net/get/xhprof-0.9.x.tgzcpxhprof-0.9.x.tgz /home/www/xhprof.tgztar zxvf/home/www/xhprof.tgzcd xhprof/extensionphpize./configure--enable-xhprof--with-php-config=/usr/bin/php-configmake && make installvim /etc/php.ini[xhprof]extension=xhprof.so;下面的这个地址是用来保存测量记录的目录,在页面 阅读全文
posted @ 2014-02-17 20:03 ifeixiang 阅读(2776) 评论(0) 推荐(0) 编辑
摘要:ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)可以在配置文件中加入:log_bin_trust_function_creators = 1已经运行的Mysql,可以直接show variables like  阅读全文
posted @ 2014-02-12 15:03 ifeixiang 阅读(253) 评论(0) 推荐(0) 编辑
摘要:例如:PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 3 DAY); 阅读全文
posted @ 2014-02-12 14:04 ifeixiang 阅读(630) 评论(0) 推荐(0) 编辑
摘要:-- mysql慢查询日志相关参数-- 慢查询日志时间show variables like "long_query_time"; -- 将时间设置为2sset global long_query_time=2; -- 是否开启慢查询日志show variables like "slow_query_log";-- 打开慢查询日志set global slow_query_log='ON'; -- 查询一下文件show variables like "%slow%";使用mysqldumpslow可以将日志转化为可读格 阅读全文
posted @ 2014-02-12 10:43 ifeixiang 阅读(748) 评论(0) 推荐(0) 编辑