表示 进入内容 132113301407
« 先前的 10 新的记录 | 下一步 10 较早的记录 »
Displaying posts with tag: Linux (reset)
mysql如何跟踪执行的sql语句

在SQL SERVER下跟踪sql采用事件探查器,而在mysql下如何跟踪sql呢? 其实方法很简单,开启mysql的日志log功能,通过查看跟踪日志即可。 开启mysql的日志log方法: windows环境下的配置方法:我使用的版本:Version: 5.

【linux】  【mysql】  【SQL】  【日志】  【LOG】  【windows】  【配置】   …

[获取更多]
sql点滴37—mysql中的错误Data too long for column '' at row 1

1、MYSQL服务 我的电脑——(右键)管理——服务与应用程序——服务——MYSQL——开启(停止、重启动)   2、命令行方式  Windows   1.点击“开始”->“运行”(快捷键Win+R)。

【linux】  【服务器】  【mysql】  【SQL】  【windows】  【配置】  【service】   …

[获取更多]
MySQL Cluster 7.3.3 官方版本下载

MySQL Cluster 是 MySQL 适合于分布式计算环境的高实用、高冗余版本。它采用了NDB Cluster 存储引擎,允许在1个 Cluster 中运行多个MySQL服务器。在MyQL 5.0及以上的二进制版本中、以及与最新的Linux版本兼容的RPM中提供了该存储引擎。

【linux】  【服务器】  【mysql】  【高可用】  【源码】  【数据库】   …

[获取更多]
linux下Mysql 的安装、配置、数据导入导出

原文 linux下Mysql 的安装、配置、数据导入导出 MySQL是一种开放源代码的关系型数据库管理系统(RDBMS),虽然功能未必很强大,但因它的免费开源而广受欢迎。   这次,接着上一篇《CentOs minimal安装和开发环境部署》,讲下Linux环境mysql的安装、初始化配置、以及参数优化,中间会穿插在实际操作过程中遇到的新知识扩展。

【linux】  【mysql】  【SQL】  【数据库】  【yum】   …

[获取更多]
shell中的while read 与 ssh 与多线程

shell中的while read 与 ssh 与多线程

今天在写运维工具的时候,while read line之后,
再调用ssh去远程服务器上执行命令,然后while内循环只执行了一次就退出了…

cat $hostfile | while read line
do
    echo $line ":"
    ssh "$line" "w"
    echo "====" 
done

颇为不解。只好gg.
然后发现ssh会去读stdin… 我那个while read也会读stdin..父子进程读到一起去了…
man之后,发现参数-n:

      -n      Redirects stdin from /dev/null (actually, prevents reading from stdin).  This must be used when ssh is run in the background.  A common trick is to use this to run X11 programs on a remote machine.
             For example, ssh -n shadows.cs.hut.fi emacs & will start an emacs on shadows.cs.hut.fi, and the X11 connection will be automatically forwarded over an …
[获取更多]
linux下安装mysql的问题解决

今天试了下在Linux下安装mysql,我只选了server和client两个组件,没有装其他的组件. 安装包的下载可以参见 http://www.mysql.com/downloads/ server端的安装: [root@oel2 install_mysql]# rpm -ivh MySQL-server-advanced-5.

【linux】  【mysql】  【innodb】  【Oracle】  【LOG】  【Server】  【database】   …

[获取更多]
如何建立自己的私有云存储

来源:http://www.cnblogs.com/lanxuezaipiao/archive/2013/05/27/3101883.html 现 在云计算已经算不上一个新鲜词了,各大IT公司的产品都会套上一个“云”字来忽悠用户。

【linux】  【服务器】  【mysql】  【Apache】  【根目录】  【模块】  【数据库】   …

[获取更多]
redis sorted sets demo

redis sorted sets demo

下面讲一个使用 Sorted Sets 的例子

mysql中有一张表,假设名字为 summary_data吧,记录数为30M左右,
有一个字段first_path 为varchar(256),需要找到出现次数最多的10个first_path。

方法一 ) 直接sql语句

sql语句很好写:

      SELECT first_path, COUNT(*) AS c FROM summary_data GROUP BY first_path ORDER BY c DESC LIMIT 10;

表上面是有索引的, 但是索引的长度为 KEY `first_path` (`first_path`(255)), 也许是这个原因导致了无法使用索引:
id: 1
select_type: SIMPLE
table: summary_data
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 28136948
Extra: Using temporary; Using filesort

这条sql运行了9分钟。

[获取更多]
PHP vs Nginx-Lua vs html vs c-cgi

PHP vs Nginx-Lua vs html vs c-cgi

测试环境:
nginx 1.4.2 运行在 xxx.xxx.xxx.xxx(内网IP)
Intel(R) Xeon(R) CPU E5620 @ 2.40GHz

[root@yw-0-0 ~]# php -v
PHP 5.4.16 (cli) (built: Jun  7 2013 14:32:19) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with XCache v3.0.2, Copyright (c) 2005-2013, by mOo
    with XCache Optimizer v3.0.2, Copyright (c) 2005-2013, by mOo
    with XCache Cacher v3.0.2, Copyright (c) 2005-2013, by mOo
    with XCache Coverager v3.0.2, Copyright (c) 2005-2013, by mOo
 
php-fpm配置:
pm = dynamic
pm.max_children = 200
pm.start_servers = 100
pm.min_spare_servers = 100
pm.max_spare_servers = 150

nginx配置文件:

#user  nobody;
worker_processes  4;  
error_log  logs/error.log;
events {
        use epoll;
        worker_connections  5120;
}
http …
[获取更多]
q: 单机版的hive

q: 单机版的hive

在hadoop中自己写map/reduce代码,分析文本文件, 开发效率不高,
于是有了hive,只要定义好表结构,然后就可以直接用sql语句来分析文本文件,效率大大提升。

在单机linux上呢?如果要分析一个文本文件,通常是用awk,或者py/php? 开发速度也不快
于是就有了q,可以用sql语句来分析文本文件,表结构都不用提前定义的。

https://github.com/harelba/q

      [大硬盘][zhaokunyao@ tpcc-mysql]$ ls -l >exampledatafile 
[大硬盘][zhaokunyao@ tpcc-mysql]$ cat exampledatafile 
总用量 368
-rw-rw-r--. 1 zhaokunyao zhaokunyao   1621 8月   8 16:08 add_fkey_idx.sql
-rw-rw-r--. 1 zhaokunyao zhaokunyao    317 8月   8 16:08 count.sql
-rw-rw-r--. 1 zhaokunyao zhaokunyao   3105 8月   8 16:08 create_table.sql
-rw-rw-r--. 1 zhaokunyao zhaokunyao    763 8月   8 16:08 drop_cons.sql …
[获取更多]
表示 进入内容 132113301407
« 先前的 10 新的记录 | 下一步 10 较早的记录 »