1、连接
mysql -u username -ppassword -P 3306 -D database -hip
2、列显示:"\G"
- mysql> select * from HUMMOCK_BLACK_LIST limit 1 \G;
- *************************** 1. row ***************************
- id: 483222
- version: 2
- app_name: gxw
- type: 128
- name: ip
- value: 1.1.9.98
- status: 0
- punish_status: 1
- punish_mode: 509
- available_begin: 2011-03-15 14:50:25
- available_end: 2011-03-15 14:52:05
- attack_begin: 2011-03-15 14:50:24
- access_num: 1
- block_num: 0
- speed: 0.01
- gmt_modified: 2011-03-15 14:59:58
- gmt_created: 2011-03-15 14:50:25
- server_name: LoadTest
- gmt_modified_microsecond: 1300172398493
3、去重操作:distinct
- mysql> select distinct server_name from HUMMOCK_BLACK_LIST limit 10;
- +-------------+
- | server_name |
- +-------------+
- | LoadTest |
- | localhost |
- | QA-TEST-2 |
- | DEV |
- | A-QA-TEST |
- | B-QA-TEST |
- | ????? |
- | online-test |
- +-------------+
- 8 rows in set (2.30 sec)