今天用户报出来一个问题:

show full processlist;时出现下面的情况:

|

| 46977247 | common          | %                  | common     | Connect |   391 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977311 | common          | %                  | common     | Connect |   331 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977312 | common          | %                  | common     | Connect |   330 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977406 | common          | %                  | common     | Connect |   237 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977413 | common          | %                  | common     | Connect |   231 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977446 | common          | %                  | common     | Connect |   201 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977459 | common          | %                  | common     | Connect |   189 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977462 | common          | %                  | common     | Connect |   186 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977477 | common          | %                  | common     | Connect |   171 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977489 | common          | %                  | common     | Connect |   159 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977490 | common          | %                  | common     | Connect |   158 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977493 | common          | %                  | common     | Connect |   155 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977496 | common          | %                  | common     | Connect |   152 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977511 | common          | %                  | common     | Connect |   137 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977519 | common          | %                  | common     | Connect |   129 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977523 | common          | %                  | common     | Connect |   125 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977526 | common          | %                  | common     | Connect |   123 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977530 | common          | %                  | common     | Connect |   119 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977532 | common          | %                  | common     | Connect |   117 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977533 | common          | %                  | common     | Connect |   116 | updating                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| 46977537 | common          | %                  | common     | Connect |   113 | updating

host那一列显示的只是一个  %号,没有显示ip地址。

这看起来有点不应该。 想了一下原因:没有想到,网上也不没有找到答案。

灵感出现在一瞬间:

使用下面的方式模拟:

delimiter ;;

CREATE DEFINER=`root`@`%` PROCEDURE `insert_pro`()

begin

DECLARE counter INT DEFAULT 0;

insert_loop: loop

set counter=counter+1;

insert into test  values (counter,counter,counter);

if counter=10000 then

leave insert_loop;

end if;

end loop insert_loop;

end

;;

CREATE EVENT IF NOT EXISTS e_test

ON SCHEDULE EVERY 10 SECOND

ON COMPLETION PRESERVE

DO CALL test.insert_pro();

然后去show full processlist;

mysql> show full processlist;

+----+-----------------+-----------------+------+---------+------+-----------------------------+----------------------------------------------------+

| Id | User            | Host            | db   | Command | Time | State                       | Info                                               |

+----+-----------------+-----------------+------+---------+------+-----------------------------+----------------------------------------------------+

|  1 | event_scheduler | localhost       | NULL | Daemon  |    2 | Waiting for next activation | NULL                                               |

| 64 | root            | localhost:34176 | test | Sleep   |   52 |                             | NULL                                               |

| 65 | root            | localhost:34177 | NULL | Query   |    0 | System lock                 | show full processlist                              |

| 74 | root            | %               | test | Connect |    0 | query end                   | insert into test  values (counter,counter,counter) |

| 75 | root            | %               | test | Connect |    0 | query end                   | insert into test  values (counter,counter,counter) |

+----+-----------------+-----------------+------+---------+------+-----------------------------+----------------------------------------------------+

5 rows in set (0.00 sec)

可以模拟出这种情况。

其实就是event调用的结果。

转载请注明源出处

QQ 273002188 欢迎一起学习

QQ 群 236941212

oracle,mysql,mongo 相互交流

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25099483/viewspace-2062766/,如需转载,请注明出处,否则将追究法律责任。

mysql show processlist host_show processlist host 为 百分号(%)相关推荐

  1. mysql卡住锁表 processlist explain

    1.记一次order by desc limit导致的查询慢: explain分析一下这条语句: explain select a.id,a.q_user,a.q_showtime,a.thumb,a ...

  2. Mysql 中 show full processlist

    processlist命令的输出结果显示了有哪些线程在运行,可以帮助识别出有问题的查询语句,两种方式使用这个命令. 1. 进入MySQL/bin目录下输入mysqladmin processlist; ...

  3. nagios mysql 并发_nagios监控mysql的connections和processlist

    监控connections和processlist的脚本下载地址: 1.把脚本上传到/usr/local/nagios/libexec目录下 /usr/local/nagios/libexec/che ...

  4. telnet mysql时出现:is not allowed to connect to this MySQL serverConnection closed by foreign host问题的解决

    有时候telnet一个mysql服务器的时候会出现: Host '192.168.0.1' is not allowed to connect to this MySQL serverConnecti ...

  5. 解决navicat连接阿里云服务器的mysql报错:1130 . Host 16.8 85 isnot alowed to con nect to this MySQL server

    解决navicat连接阿里云服务器的mysql报错:1130 . Host 16.8 85 isnot alowed to con nect to this MySQL server 报错效果 报错原 ...

  6. 数据库mysql无法远程访问,出现Host is not allowed to connect to this MySQL server解决办法

    数据库mysql无法远程访问,出现Host is not allowed to connect to this MySQL server解决办法 整体描述 解决方法 1. 阿里云打开3306端口 2. ...

  7. mysql kill 指令,SHOW PROCESSLIST指令与KILL指令

    功能版本说明当 DRDS 版本号小于 5.1.28-1408022 时,DRDS 仅支持物理连接的 SHOW PROCESSLIST 与 KILL 功能,请参见老版本 SHOW PROCESSLIST ...

  8. kill mysql process_Mysql 批量 kill processlist

    Mysql 批量 kill processlist Mysql 有些查询语句不合理, 或者其它一些特殊的原因会导致一个查询进程 Locked, 而如果多个相似的查询可能会因为表设计的不合理而跟着排在这 ...

  9. mysql info commit_mysql show processlist 发现大量的commit

    今天执行show processlist 发现大量的commit:查看锁信息,发现基本上都是 +----------------+----------------+------------------ ...

最新文章

  1. LaTex中的documentclass{type}应该填什么
  2. 【Groovy】集合遍历 ( “ *. “ 展开操作符 | 代码示例 )
  3. xlsxwriter写行合并_使用xlsxwriter将pandas数据框写入excel并包含“write-rich”字符串格式...
  4. 【推荐】ABAP select语句性能优化之高级教程
  5. sysdig案例分析 - 哪些文件正在被进程访问
  6. 化学专业尽早转行_尽早查看针对Java 11的功能
  7. nacos怎么修改服务分组_Nacos(六):多环境下如何“管理”及“隔离”配置和服务...
  8. 大数据时代的移动即时通讯
  9. 网络(8)-HTTP、Socket、TCP、UDP的区别和联系
  10. 基于Spring Security的认证授权_应用详解_自定义退出_Spring Security OAuth2.0认证授权---springcloud工作笔记130
  11. c++之友元函数和友元类
  12. 易班开发者大会总结;
  13. [线性代数]矩阵(mooc秦静老师讲解)
  14. 获取比Administrator还高的权限——SYSTEM权限
  15. deepin 服务器_深度官方并没有提供Deepin服务器版下载,也没有开发计划
  16. 第十一届蓝桥杯c/c++省赛大学B组(第一次)
  17. web安全入门(第七章-1)文件上传漏洞--解析、验证、伪造
  18. Kaggle---Toxic Comment Classification Challenge
  19. 阿翔编程学-Axis
  20. java作业:类设计与实现综合实验

热门文章

  1. .Net 多线程 异步编程 Await、Async和Task
  2. 关于jquery-Validate
  3. opencv 设置视频帧的分辨率“无效”
  4. mybaties xml 的头部
  5. 利用django中间件CsrfViewMiddleware防止csrf攻击
  6. 【leetcode 简单】第十一题 搜索插入位置
  7. [Golang]一道考察defer与命名返回值的题目
  8. 配置Memcache服务器并实现主从复制功能(repcached)
  9. leetcode Add and Search Word - Data structure design
  10. java工程中的.classpathaaaaaaaaaaaaaaaa转载