mysql 查看哪些host连接到数据库



SELECT SUBSTRING_INDEX(host, ':', 1) AS host_short,

        GROUP_CONCAT ( DISTINCT   USER )     AS   users ,
        COUNT ( * )
FROM     information_schema . processlist
GROUP    BY   host_short
ORDER    BY   COUNT ( * ) ,
           host_short ;

你可能感兴趣的:(mysql)