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년 전 | 635 | ||
| 7629 |
|
10년 전 | 2346 | |
| 7628 | 10년 전 | 768 | ||
| 7627 |
|
10년 전 | 1000 | |
| 7626 |
|
10년 전 | 1758 | |
| 7625 | 10년 전 | 660 | ||
| 7624 | 10년 전 | 682 | ||
| 7623 |
|
10년 전 | 3008 | |
| 7622 | 10년 전 | 695 | ||
| 7621 |
leeleeleelee
|
10년 전 | 568 | |
| 7620 | 10년 전 | 528 | ||
| 7619 | 10년 전 | 457 | ||
| 7618 | 10년 전 | 997 | ||
| 7617 | 10년 전 | 713 | ||
| 7616 | 10년 전 | 613 | ||
| 7615 | 10년 전 | 709 | ||
| 7614 | 10년 전 | 1213 | ||
| 7613 |
|
10년 전 | 2052 | |
| 7612 | 10년 전 | 1122 | ||
| 7611 | 10년 전 | 1385 | ||
| 7610 |
|
10년 전 | 1874 | |
| 7609 |
|
10년 전 | 1290 | |
| 7608 |
mwdkim
|
10년 전 | 1097 | |
| 7607 |
|
10년 전 | 1022 | |
| 7606 |
mwdkim
|
10년 전 | 3902 | |
| 7605 | 10년 전 | 669 | ||
| 7604 | 10년 전 | 1004 | ||
| 7603 | 10년 전 | 1629 | ||
| 7602 |
|
10년 전 | 1041 | |
| 7601 |
AniNest
|
10년 전 | 2762 | |
| 7600 |
port443
|
10년 전 | 999 | |
| 7599 | 10년 전 | 922 | ||
| 7598 | 10년 전 | 991 | ||
| 7597 | 10년 전 | 4553 | ||
| 7596 |
SeungYeon
|
10년 전 | 868 | |
| 7595 |
untitled
|
10년 전 | 2392 | |
| 7594 |
프로그래머7
|
10년 전 | 1700 | |
| 7593 |
untitled
|
10년 전 | 2337 | |
| 7592 |
untitled
|
10년 전 | 1914 | |
| 7591 |
untitled
|
10년 전 | 2652 | |
| 7590 |
아리마2001
|
10년 전 | 823 | |
| 7589 | 10년 전 | 1082 | ||
| 7588 |
|
10년 전 | 2900 | |
| 7587 | 10년 전 | 1276 | ||
| 7586 | 10년 전 | 641 | ||
| 7585 | 10년 전 | 1661 | ||
| 7584 | 10년 전 | 1395 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1137 | |
| 7582 |
|
10년 전 | 1072 | |
| 7581 | 10년 전 | 1303 | ||
| 7580 | 10년 전 | 945 | ||
| 7579 |
|
10년 전 | 583 | |
| 7578 | 10년 전 | 1397 | ||
| 7577 |
|
10년 전 | 1852 | |
| 7576 | 10년 전 | 1368 | ||
| 7575 |
멋진남자임
|
10년 전 | 1447 | |
| 7574 | 10년 전 | 2088 | ||
| 7573 | 10년 전 | 3220 | ||
| 7572 | 10년 전 | 748 | ||
| 7571 |
|
10년 전 | 771 | |
| 7570 |
|
10년 전 | 1295 | |
| 7569 | 10년 전 | 1523 | ||
| 7568 |
this1mg
|
10년 전 | 1023 | |
| 7567 |
|
10년 전 | 732 | |
| 7566 | 10년 전 | 901 | ||
| 7565 |
Angel하늘
|
10년 전 | 966 | |
| 7564 |
seoldi
|
10년 전 | 1206 | |
| 7563 |
|
10년 전 | 1352 | |
| 7562 |
멋진남자임
|
10년 전 | 2046 | |
| 7561 | 10년 전 | 683 | ||
| 7560 |
leeleeleelee
|
10년 전 | 881 | |
| 7559 | 10년 전 | 5012 | ||
| 7558 |
RinaP
|
10년 전 | 755 | |
| 7557 |
|
10년 전 | 1222 | |
| 7556 | 10년 전 | 1171 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1635 | |
| 7554 | 10년 전 | 1074 | ||
| 7553 |
senseme
|
10년 전 | 1321 | |
| 7552 |
ehdltdoit
|
10년 전 | 1416 | |
| 7551 |
|
10년 전 | 1800 | |
| 7550 |
leeleeleelee
|
10년 전 | 1564 | |
| 7549 | 10년 전 | 2395 | ||
| 7548 | 10년 전 | 1815 | ||
| 7547 |
멋진남자임
|
10년 전 | 1928 | |
| 7546 | 10년 전 | 968 | ||
| 7545 |
ILMare1003
|
10년 전 | 1258 | |
| 7544 |
|
10년 전 | 1211 | |
| 7543 | 10년 전 | 863 | ||
| 7542 | 10년 전 | 636 | ||
| 7541 |
울라라라우
|
10년 전 | 850 | |
| 7540 | 10년 전 | 1583 | ||
| 7539 | 10년 전 | 903 | ||
| 7538 |
|
10년 전 | 1815 | |
| 7537 | 10년 전 | 3591 | ||
| 7536 |
Gaumi
|
10년 전 | 1389 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1246 | |
| 7534 |
senseme
|
10년 전 | 1194 | |
| 7533 | 10년 전 | 1172 | ||
| 7532 | 10년 전 | 836 | ||
| 7531 | 10년 전 | 2029 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기