• show processlist


    mysql> show processlist; #mysql服务器查看有那些主机连进来,并列出它们查什么库
    +-----+------+-----------+------+---------+------+-------+------------------+
    | Id  | User | Host      | db   | Command | Time | State | Info             |
    +-----+------+-----------+------+---------+------+-------+------------------+
    | 516 | root | localhost | NULL | Query   |    0 | NULL  | show processlist |
    +-----+------+-----------+------+---------+------+-------+------------------+
    1 row in set (0.00 sec)
    
    [root@bass ~]# ssh 192.168.1.89
    reverse mapping checking getaddrinfo for bogon [192.168.1.89] failed - POSSIBLE BREAK-IN ATTEMPT!
    root@192.168.1.89's password: 
    Last login: Sun May  8 04:57:24 2016 from 192.168.1.10
    [root@v01 ~]# mysql -usx -p -h101.200.xx.xx
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 517
    Server version: 5.5.40-log MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | sx                 |
    | test               |
    +--------------------+
    3 rows in set (0.01 sec)
    
    mysql> show processlist;
    +-----+------+----------------------+------+---------+------+-------+------------------+
    | Id  | User | Host                 | db   | Command | Time | State | Info             |
    +-----+------+----------------------+------+---------+------+-------+------------------+
    | 516 | root | localhost            | NULL | Query   |    0 | NULL  | show processlist |
    | 517 | sx   | 118.194.xxx.xxx:xxx | NULL | Sleep   |   28 |       | NULL             |
    +-----+------+----------------------+------+---------+------+-------+------------------+
    2 rows in set (0.00 sec)
    
    mysql> use mysql;
    Database changed
    mysql> show tables;
    +---------------------------+
    | Tables_in_mysql           |
    +---------------------------+
    | columns_priv              |
    | db                        |
    | event                     |
    | func                      |
    | general_log               |
    | help_category             |
    | help_keyword              |
    | help_relation             |
    | help_topic                |
    | host                      |
    | ndb_binlog_index          |
    | plugin                    |
    | proc                      |
    | procs_priv                |
    | proxies_priv              |
    | servers                   |
    | slow_log                  |
    | tables_priv               |
    | time_zone                 |
    | time_zone_leap_second     |
    | time_zone_name            |
    | time_zone_transition      |
    | time_zone_transition_type |
    | user                      |
    +---------------------------+
    24 rows in set (0.01 sec)
    
    mysql> show processlist;
    +-----+------+----------------------+-------+---------+------+-------+------------------+
    | Id  | User | Host                 | db    | Command | Time | State | Info             |
    +-----+------+----------------------+-------+---------+------+-------+------------------+
    | 516 | root | localhost            | mysql | Query   |    0 | NULL  | show processlist |
    | 517 | sx   | 118.194.xxx.xxx:2373 | NULL  | Sleep   |  297 |       | NULL             |
    +-----+------+----------------------+-------+---------+------+-------+------------------+
    2 rows in set (0.00 sec)
    
  • 相关阅读:
    登录页面上的验证码的生成
    数据库操作中使用事务进行提速
    Dotnet程序集自动生成版本号
    .NET与Java的Web Services相互调用(转)
    Struts配置
    C# WebService发布与调用方法(转)
    WinCE中C#WinForm利用Web Service查询数据库(转)
    C#打包
    VS2008快捷键大全
    这些话你懂吗?
  • 原文地址:https://www.cnblogs.com/bass6/p/5476607.html
Copyright © 2020-2023  润新知