mysql 사용시 콘솔내에서 유용하게 사용할 수 있는 방법 몇가지를 정리합니다.
Query 세로 보기
접속자 및 현재 실행중인 Query 확인
테이블 정보 요약
1. 결과 세로로 보기
# 세로보기
mysql> select now()\G
*************************** 1. row ***************************
now(): 2014-12-02 09:30:37
1 row in set (0.00 sec)
#기존의 가로보기
mysql> select now(); 또는 select now()\g
+---------------------+
| now() |
+---------------------+
| 2014-12-02 09:30:30 |
+---------------------+
1 row in set (0.00 sec)
2. mysql 접속자 및 현재 실행중인 query 확인
mysql> show processlist;
+-------+-----------+-----------------+--------+---------+-------+-------+------------------+
| Id | User| Host | db | Command | Time| State | Info |
+-------+-----------+-----------------+--------+---------+-------+-------+------------------+
| 14965 | test| localhost:54679 | test | Sleep | 18056 || NULL|
| 15053 | test| localhost:58070 | test | Sleep | 15126 || NULL|
| 15283 | test| localhost:59917 | test | Sleep | 7801 || NULL|
| 15362 | test| localhost:50901 | test | Sleep | 4872 || NULL|
| 15412 | test| localhost:48443 | test | Sleep | 2672 || select * from TEST_TABLE .......... |
| 15487 | root| localhost| mysql | Query | 0 | NULL | show processlist |
+-------+-----------+-----------------+--------+---------+-------+-------+------------------+
6 rows in set (0.00 sec)
위와 같이 실행하면 긴 query 의 경우 잘려서 노출이 되게 된다.
긴 query에 대해 전체 출력을 하고자 한다면 아래와 같이 한다.
mysql> show full processlist;
+-------+-----------+-----------------+--------+---------+-------+-------+------------------+
| Id | User| Host | db | Command | Time| State | Info|
+-------+-----------+-----------------+--------+---------+-------+-------+------------------+
| 14965 | test | localhost:54679 | test | Sleep | 18056 || NULL|
| 15053 | test | localhost:58070 | test | Sleep | 15126 || NULL|
| 15283 | test | localhost:59917 | test | Sleep | 7801 || NULL|
| 15362 | test | localhost:50901 | test | Sleep | 4872 || NULL|
| 15412 | test | localhost:48443 | test | Sleep | 2672 || select * from TEST_TABLE where devcoding = 10|
| 15487 | root | localhost | mysql | Query | 0 | NULL | show processlist |
+-------+-----------+-----------------+--------+---------+-------+-------+------------------+
6 rows in set (0.00 sec)
3. 현재 데이타베이스의 테이블 정보
mysql> show table status\G
*************************** 1. row ***************************
Name: columns_priv
Engine: MyISAM
Version: 10
Row_format: Fixed
Rows: 0
Avg_row_length: 0
Data_length: 0
Max_data_length: 227994731135631359
Index_length: 1024
Data_free: 0
Auto_increment: NULL
Create_time: 2009-03-24 23:25:43
Update_time: 2009-03-24 23:25:43
Check_time: NULL
Collation: utf8_bin
Checksum: NULL
Create_options:
Comment: Column privileges
*************************** 2. row ***************************
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7630 | 10년 전 | 664 | ||
| 7629 |
|
10년 전 | 2407 | |
| 7628 | 10년 전 | 799 | ||
| 7627 |
|
10년 전 | 1041 | |
| 7626 |
|
10년 전 | 1799 | |
| 7625 | 10년 전 | 723 | ||
| 7624 | 10년 전 | 739 | ||
| 7623 |
|
10년 전 | 3111 | |
| 7622 | 10년 전 | 743 | ||
| 7621 |
leeleeleelee
|
10년 전 | 593 | |
| 7620 | 10년 전 | 547 | ||
| 7619 | 10년 전 | 500 | ||
| 7618 | 10년 전 | 1038 | ||
| 7617 | 10년 전 | 733 | ||
| 7616 | 10년 전 | 663 | ||
| 7615 | 10년 전 | 734 | ||
| 7614 | 10년 전 | 1275 | ||
| 7613 |
|
10년 전 | 2089 | |
| 7612 | 10년 전 | 1163 | ||
| 7611 | 10년 전 | 1431 | ||
| 7610 |
|
10년 전 | 1909 | |
| 7609 |
|
10년 전 | 1363 | |
| 7608 |
mwdkim
|
10년 전 | 1143 | |
| 7607 |
|
10년 전 | 1068 | |
| 7606 |
mwdkim
|
10년 전 | 3946 | |
| 7605 | 10년 전 | 697 | ||
| 7604 | 10년 전 | 1037 | ||
| 7603 | 10년 전 | 1658 | ||
| 7602 |
|
10년 전 | 1087 | |
| 7601 |
AniNest
|
10년 전 | 2804 | |
| 7600 |
port443
|
10년 전 | 1043 | |
| 7599 | 10년 전 | 954 | ||
| 7598 | 10년 전 | 1035 | ||
| 7597 | 10년 전 | 4583 | ||
| 7596 |
SeungYeon
|
10년 전 | 904 | |
| 7595 |
untitled
|
10년 전 | 2443 | |
| 7594 |
프로그래머7
|
10년 전 | 1745 | |
| 7593 |
untitled
|
10년 전 | 2387 | |
| 7592 |
untitled
|
10년 전 | 1954 | |
| 7591 |
untitled
|
10년 전 | 2687 | |
| 7590 |
아리마2001
|
10년 전 | 861 | |
| 7589 | 10년 전 | 1118 | ||
| 7588 |
|
10년 전 | 2931 | |
| 7587 | 10년 전 | 1315 | ||
| 7586 | 10년 전 | 678 | ||
| 7585 | 10년 전 | 1710 | ||
| 7584 | 10년 전 | 1419 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1178 | |
| 7582 |
|
10년 전 | 1139 | |
| 7581 | 10년 전 | 1366 | ||
| 7580 | 10년 전 | 1017 | ||
| 7579 |
|
10년 전 | 614 | |
| 7578 | 10년 전 | 1437 | ||
| 7577 |
|
10년 전 | 1881 | |
| 7576 | 10년 전 | 1396 | ||
| 7575 |
멋진남자임
|
10년 전 | 1476 | |
| 7574 | 10년 전 | 2131 | ||
| 7573 | 10년 전 | 3265 | ||
| 7572 | 10년 전 | 768 | ||
| 7571 |
|
10년 전 | 789 | |
| 7570 |
|
10년 전 | 1330 | |
| 7569 | 10년 전 | 1560 | ||
| 7568 |
this1mg
|
10년 전 | 1058 | |
| 7567 |
|
10년 전 | 774 | |
| 7566 | 10년 전 | 925 | ||
| 7565 |
Angel하늘
|
10년 전 | 1023 | |
| 7564 |
seoldi
|
10년 전 | 1266 | |
| 7563 |
|
10년 전 | 1402 | |
| 7562 |
멋진남자임
|
10년 전 | 2102 | |
| 7561 | 10년 전 | 719 | ||
| 7560 |
leeleeleelee
|
10년 전 | 922 | |
| 7559 | 10년 전 | 5061 | ||
| 7558 |
RinaP
|
10년 전 | 799 | |
| 7557 |
|
10년 전 | 1263 | |
| 7556 | 10년 전 | 1202 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1674 | |
| 7554 | 10년 전 | 1104 | ||
| 7553 |
senseme
|
10년 전 | 1347 | |
| 7552 |
ehdltdoit
|
10년 전 | 1446 | |
| 7551 |
|
10년 전 | 1836 | |
| 7550 |
leeleeleelee
|
10년 전 | 1602 | |
| 7549 | 10년 전 | 2441 | ||
| 7548 | 10년 전 | 1854 | ||
| 7547 |
멋진남자임
|
10년 전 | 1971 | |
| 7546 | 10년 전 | 1015 | ||
| 7545 |
ILMare1003
|
10년 전 | 1303 | |
| 7544 |
|
10년 전 | 1261 | |
| 7543 | 10년 전 | 897 | ||
| 7542 | 10년 전 | 671 | ||
| 7541 |
울라라라우
|
10년 전 | 874 | |
| 7540 | 10년 전 | 1604 | ||
| 7539 | 10년 전 | 948 | ||
| 7538 |
|
10년 전 | 1839 | |
| 7537 | 10년 전 | 3623 | ||
| 7536 |
Gaumi
|
10년 전 | 1423 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1286 | |
| 7534 |
senseme
|
10년 전 | 1212 | |
| 7533 | 10년 전 | 1213 | ||
| 7532 | 10년 전 | 877 | ||
| 7531 | 10년 전 | 2068 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기