mysql
文章平均质量分 61
reymondtu
这个作者很懒,什么都没留下…
展开
-
MySQL-5.1.40 for linux 安装与部署
mysql-5.1.40-linux-i686-glibc23.tar.gz安装笔记: 1.首先添加mysql用户组 [code="shell"] shell> groupadd mysql [/code] 2.添加mysql用户,并指定到mysql用户组 [code="shell"] shell> useradd -g mysql mysql [/code] 3.解压缩my...原创 2009-11-19 13:55:54 · 239 阅读 · 0 评论 -
mysql4 order by不支持函数bug
mysql 4.1.18 中存在不支持函数order by的bug select a, sum(b) from tablename group by a order by sum(b) 此时会出现ERROR 1111 (HY000): Invalid use of group function 绕过此bug的方法是给sum(b) 加上as select a, ...2011-03-22 12:00:44 · 98 阅读 · 0 评论 -
MySQL随机字符串生成
drop function if exists rand_string; create function rand_string(str_length tinyint unsigned, str_type tinyint unsigned) returns varchar(255) begin -- Function : rand_string -- Author ...2011-03-28 00:15:45 · 305 阅读 · 0 评论 -
MySQL单引号引起的严重性能问题
最近在工作中遇到一个MySQL update的严重性能问题,语句大概是这样的: update t_user set fstate=0 where fuid in (11111, 22222, ...., .....) in后的括号中,有1000个fuid的样子 表结构如下: 存储引擎是Innodb, 版本是MySQL 4.0.18...2011-11-16 01:06:44 · 337 阅读 · 0 评论