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년 전 | 2351 | |
| 7628 | 10년 전 | 771 | ||
| 7627 |
|
10년 전 | 1003 | |
| 7626 |
|
10년 전 | 1761 | |
| 7625 | 10년 전 | 663 | ||
| 7624 | 10년 전 | 685 | ||
| 7623 |
|
10년 전 | 3016 | |
| 7622 | 10년 전 | 700 | ||
| 7621 |
leeleeleelee
|
10년 전 | 572 | |
| 7620 | 10년 전 | 529 | ||
| 7619 | 10년 전 | 462 | ||
| 7618 | 10년 전 | 1000 | ||
| 7617 | 10년 전 | 714 | ||
| 7616 | 10년 전 | 616 | ||
| 7615 | 10년 전 | 713 | ||
| 7614 | 10년 전 | 1221 | ||
| 7613 |
|
10년 전 | 2059 | |
| 7612 | 10년 전 | 1125 | ||
| 7611 | 10년 전 | 1385 | ||
| 7610 |
|
10년 전 | 1879 | |
| 7609 |
|
10년 전 | 1295 | |
| 7608 |
mwdkim
|
10년 전 | 1099 | |
| 7607 |
|
10년 전 | 1025 | |
| 7606 |
mwdkim
|
10년 전 | 3904 | |
| 7605 | 10년 전 | 671 | ||
| 7604 | 10년 전 | 1009 | ||
| 7603 | 10년 전 | 1633 | ||
| 7602 |
|
10년 전 | 1042 | |
| 7601 |
AniNest
|
10년 전 | 2764 | |
| 7600 |
port443
|
10년 전 | 1002 | |
| 7599 | 10년 전 | 924 | ||
| 7598 | 10년 전 | 992 | ||
| 7597 | 10년 전 | 4557 | ||
| 7596 |
SeungYeon
|
10년 전 | 870 | |
| 7595 |
untitled
|
10년 전 | 2397 | |
| 7594 |
프로그래머7
|
10년 전 | 1700 | |
| 7593 |
untitled
|
10년 전 | 2338 | |
| 7592 |
untitled
|
10년 전 | 1920 | |
| 7591 |
untitled
|
10년 전 | 2658 | |
| 7590 |
아리마2001
|
10년 전 | 826 | |
| 7589 | 10년 전 | 1087 | ||
| 7588 |
|
10년 전 | 2902 | |
| 7587 | 10년 전 | 1280 | ||
| 7586 | 10년 전 | 645 | ||
| 7585 | 10년 전 | 1664 | ||
| 7584 | 10년 전 | 1398 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1141 | |
| 7582 |
|
10년 전 | 1075 | |
| 7581 | 10년 전 | 1306 | ||
| 7580 | 10년 전 | 948 | ||
| 7579 |
|
10년 전 | 590 | |
| 7578 | 10년 전 | 1399 | ||
| 7577 |
|
10년 전 | 1854 | |
| 7576 | 10년 전 | 1369 | ||
| 7575 |
멋진남자임
|
10년 전 | 1447 | |
| 7574 | 10년 전 | 2091 | ||
| 7573 | 10년 전 | 3222 | ||
| 7572 | 10년 전 | 750 | ||
| 7571 |
|
10년 전 | 774 | |
| 7570 |
|
10년 전 | 1296 | |
| 7569 | 10년 전 | 1525 | ||
| 7568 |
this1mg
|
10년 전 | 1027 | |
| 7567 |
|
10년 전 | 734 | |
| 7566 | 10년 전 | 905 | ||
| 7565 |
Angel하늘
|
10년 전 | 967 | |
| 7564 |
seoldi
|
10년 전 | 1211 | |
| 7563 |
|
10년 전 | 1354 | |
| 7562 |
멋진남자임
|
10년 전 | 2050 | |
| 7561 | 10년 전 | 684 | ||
| 7560 |
leeleeleelee
|
10년 전 | 884 | |
| 7559 | 10년 전 | 5017 | ||
| 7558 |
RinaP
|
10년 전 | 756 | |
| 7557 |
|
10년 전 | 1223 | |
| 7556 | 10년 전 | 1172 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1638 | |
| 7554 | 10년 전 | 1077 | ||
| 7553 |
senseme
|
10년 전 | 1322 | |
| 7552 |
ehdltdoit
|
10년 전 | 1420 | |
| 7551 |
|
10년 전 | 1805 | |
| 7550 |
leeleeleelee
|
10년 전 | 1568 | |
| 7549 | 10년 전 | 2398 | ||
| 7548 | 10년 전 | 1818 | ||
| 7547 |
멋진남자임
|
10년 전 | 1934 | |
| 7546 | 10년 전 | 977 | ||
| 7545 |
ILMare1003
|
10년 전 | 1258 | |
| 7544 |
|
10년 전 | 1212 | |
| 7543 | 10년 전 | 866 | ||
| 7542 | 10년 전 | 637 | ||
| 7541 |
울라라라우
|
10년 전 | 850 | |
| 7540 | 10년 전 | 1586 | ||
| 7539 | 10년 전 | 907 | ||
| 7538 |
|
10년 전 | 1816 | |
| 7537 | 10년 전 | 3595 | ||
| 7536 |
Gaumi
|
10년 전 | 1389 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1249 | |
| 7534 |
senseme
|
10년 전 | 1195 | |
| 7533 | 10년 전 | 1174 | ||
| 7532 | 10년 전 | 838 | ||
| 7531 | 10년 전 | 2031 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기