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년 전 | 689 | ||
| 7629 |
|
10년 전 | 2450 | |
| 7628 | 10년 전 | 827 | ||
| 7627 |
|
10년 전 | 1059 | |
| 7626 |
|
10년 전 | 1814 | |
| 7625 | 10년 전 | 746 | ||
| 7624 | 10년 전 | 755 | ||
| 7623 |
|
10년 전 | 3149 | |
| 7622 | 10년 전 | 764 | ||
| 7621 |
leeleeleelee
|
10년 전 | 615 | |
| 7620 | 10년 전 | 563 | ||
| 7619 | 10년 전 | 530 | ||
| 7618 | 10년 전 | 1065 | ||
| 7617 | 10년 전 | 749 | ||
| 7616 | 10년 전 | 686 | ||
| 7615 | 10년 전 | 749 | ||
| 7614 | 10년 전 | 1292 | ||
| 7613 |
|
10년 전 | 2107 | |
| 7612 | 10년 전 | 1190 | ||
| 7611 | 10년 전 | 1452 | ||
| 7610 |
|
10년 전 | 1927 | |
| 7609 |
|
10년 전 | 1384 | |
| 7608 |
mwdkim
|
10년 전 | 1159 | |
| 7607 |
|
10년 전 | 1087 | |
| 7606 |
mwdkim
|
10년 전 | 3970 | |
| 7605 | 10년 전 | 718 | ||
| 7604 | 10년 전 | 1057 | ||
| 7603 | 10년 전 | 1674 | ||
| 7602 |
|
10년 전 | 1104 | |
| 7601 |
AniNest
|
10년 전 | 2820 | |
| 7600 |
port443
|
10년 전 | 1064 | |
| 7599 | 10년 전 | 971 | ||
| 7598 | 10년 전 | 1043 | ||
| 7597 | 10년 전 | 4595 | ||
| 7596 |
SeungYeon
|
10년 전 | 917 | |
| 7595 |
untitled
|
10년 전 | 2466 | |
| 7594 |
프로그래머7
|
10년 전 | 1756 | |
| 7593 |
untitled
|
10년 전 | 2395 | |
| 7592 |
untitled
|
10년 전 | 1964 | |
| 7591 |
untitled
|
10년 전 | 2702 | |
| 7590 |
아리마2001
|
10년 전 | 881 | |
| 7589 | 10년 전 | 1134 | ||
| 7588 |
|
10년 전 | 2946 | |
| 7587 | 10년 전 | 1331 | ||
| 7586 | 10년 전 | 696 | ||
| 7585 | 10년 전 | 1731 | ||
| 7584 | 10년 전 | 1430 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1197 | |
| 7582 |
|
10년 전 | 1161 | |
| 7581 | 10년 전 | 1388 | ||
| 7580 | 10년 전 | 1042 | ||
| 7579 |
|
10년 전 | 633 | |
| 7578 | 10년 전 | 1451 | ||
| 7577 |
|
10년 전 | 1894 | |
| 7576 | 10년 전 | 1405 | ||
| 7575 |
멋진남자임
|
10년 전 | 1491 | |
| 7574 | 10년 전 | 2153 | ||
| 7573 | 10년 전 | 3289 | ||
| 7572 | 10년 전 | 785 | ||
| 7571 |
|
10년 전 | 805 | |
| 7570 |
|
10년 전 | 1353 | |
| 7569 | 10년 전 | 1574 | ||
| 7568 |
this1mg
|
10년 전 | 1072 | |
| 7567 |
|
10년 전 | 793 | |
| 7566 | 10년 전 | 939 | ||
| 7565 |
Angel하늘
|
10년 전 | 1039 | |
| 7564 |
seoldi
|
10년 전 | 1285 | |
| 7563 |
|
10년 전 | 1422 | |
| 7562 |
멋진남자임
|
10년 전 | 2125 | |
| 7561 | 10년 전 | 749 | ||
| 7560 |
leeleeleelee
|
10년 전 | 940 | |
| 7559 | 10년 전 | 5077 | ||
| 7558 |
RinaP
|
10년 전 | 815 | |
| 7557 |
|
10년 전 | 1274 | |
| 7556 | 10년 전 | 1218 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1689 | |
| 7554 | 10년 전 | 1117 | ||
| 7553 |
senseme
|
10년 전 | 1366 | |
| 7552 |
ehdltdoit
|
10년 전 | 1461 | |
| 7551 |
|
10년 전 | 1847 | |
| 7550 |
leeleeleelee
|
10년 전 | 1621 | |
| 7549 | 10년 전 | 2453 | ||
| 7548 | 10년 전 | 1862 | ||
| 7547 |
멋진남자임
|
10년 전 | 1984 | |
| 7546 | 10년 전 | 1024 | ||
| 7545 |
ILMare1003
|
10년 전 | 1317 | |
| 7544 |
|
10년 전 | 1272 | |
| 7543 | 10년 전 | 910 | ||
| 7542 | 10년 전 | 689 | ||
| 7541 |
울라라라우
|
10년 전 | 889 | |
| 7540 | 10년 전 | 1620 | ||
| 7539 | 10년 전 | 967 | ||
| 7538 |
|
10년 전 | 1854 | |
| 7537 | 10년 전 | 3643 | ||
| 7536 |
Gaumi
|
10년 전 | 1450 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1304 | |
| 7534 |
senseme
|
10년 전 | 1224 | |
| 7533 | 10년 전 | 1227 | ||
| 7532 | 10년 전 | 899 | ||
| 7531 | 10년 전 | 2092 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기