zoukankan      html  css  js  c++  java
  • mysqll 数据库相互堵塞问题

    192.168.11.186 远程访问192.168.11.185 数据库
    
    186上看到:
    
    centos6.5:/root#mysql -uroot -p'kjk123123' -h192.168.11.185 -e"show processlist" | grep 186
    Warning: Using a password on the command line interface can be insecure.
    1692	root	192.168.11.186:38167	NULL	Sleep	61		NULL
    
    185上开启session 1692:
    zabbix:/root# netstat -nap | grep 3306 | grep 185
    tcp        0      0 192.168.11.186:38167        192.168.11.185:3306         ESTABLISHED 14778/mysql         
    zabbix:/root# 
    
    
    185上开启session1706:
    
    Warning: Using a password on the command line interface can be insecure.
    1692	root	192.168.11.186:38167	DEVOPS	Sleep	40		NULL
    1706	root	192.168.11.186:53609	DEVOPS	Sleep	13		NULL
    
    
    185上开启session1711:
    
    centos6.5:/root#mysql -uroot -p'kjk123123' -h192.168.11.185 -e"show processlist" | grep 186
    Warning: Using a password on the command line interface can be insecure.
    1692	root	192.168.11.186:38167	DEVOPS	Sleep	204		NULL
    1706	root	192.168.11.186:53609	DEVOPS	Sleep	177		NULL
    1711	root	192.168.11.186:32798	NULL	Sleep	3		NULL
    
    
    
    zabbix:/root/mysql# perl mon_transaction.pl  kjk123123 192.168.11.185 
    ,,,,,
    2016-11-24 09:08:32,31,1706,root,192.168.11.186:53609,DEVOPS
     mysql[192.168.11.185]  processid[1706] root@192.168.11.186:53609 in db[DEVOPS] hold  transaction time 31 
     
    2016-11-24 09:08:32,275,1692,root,192.168.11.186:38167,DEVOPS
     mysql[192.168.11.185]  processid[1692] root@192.168.11.186:38167 in db[DEVOPS] hold  transaction time 275 
     
    2016-11-24 09:08:32,25,1711,root,192.168.11.186:32798,DEVOPS
     mysql[192.168.11.185]  processid[1711] root@192.168.11.186:32798 in db[DEVOPS] hold  transaction time 25 
     
    5548,1711,delete from test where username='admin',5547,1706,delete from test where username='admin'
      blocking_thread[1706] blocking waiting_thread[1711]'s delete from test where username='admin'
      
    5548,1711,delete from test where username='admin',5546,1692,
      blocking_thread[1692] blocking waiting_thread[1711]'s delete from test where username='admin'
      
    5547,1706,delete from test where username='admin',5546,1692,
      blocking_thread[1692] blocking waiting_thread[1706]'s delete from test where username='admin'

  • 相关阅读:
    Linux命令行和Shell高效率使用方法
    PHP导出word,CVS,PDF
    PHP的CLI综合
    [PHP]算法-二叉树中和为某一值的路径的PHP实现
    [PHP]算法- 判断是否为二叉搜索树的后序遍历序列的PHP实现
    [PHP]算法- 二叉树的深度的PHP实现
    [PHP] 算法-镜像二叉树的PHP实现
    [PHP] 算法-二叉树的子结构判断的PHP实现
    [PHP] 算法-邻接矩阵图的广度和深度优先遍历的PHP实现
    [PHP] 算法-根据前序和中序遍历结果重建二叉树的PHP实现
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350013.html
Copyright © 2011-2022 走看看