mysql show processlist;问题
当连接数过多时,我们会用show processlist;命令查看都在跑什么进程,但是有1000个连接,前面的都被刷屏刷掉了 看不到 ? 问 怎么才能找到阻塞的SQL进程呢?
我试试 ……………………
OK 谢谢 看来我的知识还没有学系统阿
相关问答:
我是用mysql自带的C API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))
{
AfxMessageBox("数据库连接失败") ......
先上错误
无法联接数据库
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java: ......
在C++程序中通过mysql的C API直接连接数据库,当把中文插入mysql的时候,就变成乱码了.
还有就是使用load把文本文件导入mysql数据库,无论文本文件是ANSI编码还是utf8编码,导入之后都是乱码。
其中mysq的编码格式 ......
表
CREATE TABLE `ch1` (
`id` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT,
`no` int(10) unsigned DEFAULT NULL,
`dtime` datetime DEFAULT NULL,
PRIMARY KEY (`id ......
bas_car 表 有列carname ,要进行数据统计,
select count(a.carname),a.carname from bas_car a,bas_car b where a.carid>=b.carid and a.carname=b.carname
group by a.carname
如上查询结 ......