
数据库
zhu_9527
性格开朗,没事写写代码。
展开
-
Ubuntu下忘记MySQL root密码解决方法
忘了mysql密码,从网上找到的解决方案记录在这里。编辑mysql的配置文件/etc/mysql/my.cnf,在[mysqld]段下加入一行“skip-grant-tables”。重启mysql服务www.linuxidc.com @ubuntu:~$ sudo service mysql restart mysql stop/waiting mysql star翻译 2014-01-22 09:53:02 · 647 阅读 · 0 评论 -
从数据库里查重复的记录大于2的记录个数
select count(*) as U from (select count(*) as c from test.user group by b)as t where t.c >=2; select count(*) from (select count(*) from test.`user` group by b having count(*)>=2) as t ;原创 2014-01-13 21:05:34 · 7992 阅读 · 1 评论