Solved

How to customized mysql command line output

Posted on 2009-04-07
13
275 Views
Last Modified: 2012-05-06
Hi
in mysql command line, if i type

show status

its gives a long output , so i cant see the first few records because of long result.
which command shall i use to make it page by page , like in linux we use , ls -l | less . is there any command in for mysql command line to make it page by page ??
0
Comment
Question by:virtualsolver
13 Comments
 
LVL 6

Expert Comment

by:BALMUKUND KESHAV
ID: 24084994
which client software are you using to connect to mysql databse ?
If you are using SqlYog or MysqlAdmin there is setting for no.of records to be displayed in result set.
Set appropriately or take output in csv/Xls/XML file

Regards,

Bm Keshav

0
 

Author Comment

by:virtualsolver
ID: 24085015
HI thanks
I am using Mysql Command line, i have install mysql 5 in linux server so i am accessing it from command line like this

mysql -p
-> password
so i have intered mysql command line

Myql>show status

its giving me long result, so i cant view previous result, i want to make it page by page

check the picture how i am trying to access

mysqlserver.GIF
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 24085574
on shell prompt :

shell> mysql -uUSER -pPASSWORD -e "show status"  > show_status.out
shell> vi show_status.out
0
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 

Author Comment

by:virtualsolver
ID: 24085874
so you guys saying
there is no way i can customized my output in mysql command line ??
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 24085898
Here you are using Putty and if you want to do a scroll up and see the results:

Right Click on Putty Titlebar
Goto Window
Reset Line of scrollback = 1000 or whatever you want.

<See Image>


putty.JPG
0
 

Author Comment

by:virtualsolver
ID: 24085916
haha LOL

what about monitor ?? yes, i am using putty, but from monitor which is connected to the server, how will i set scrol in their ??
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 24085950
"LOL" !!!??

Monitor has no role to play here!!
Change the settings, you will get 1000 lines - scrollbar and you will be able to scroll back that much.
Will suffice your requirement.
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24085985
sorry for laughing, i realy appreciated the answer you gave , but that solution does not satisfy the full problem..

omm let me explain properly , forget putty. because this one is in vmware environment so i had to use putty

i have mysql server installed on proper physical server which has a monitor aswell
i am standing infront of  that server
and i have executed " show variables " commadn which returned 256 row which impossilbe to fit in one screen. so  i cant see the first few records

thast why i want to know how can you customized this output to see page by page ..  


does it make sense ??

0
 
LVL 21

Accepted Solution

by:
theGhost_k8 earned 500 total points
ID: 24086075
:) Everything made sense !!

Okay now I was just trying to make it possible any how..
One was Linux way, Other was PuTTY way...

And here is mysql way:-
mysql -uusername -ppassword  --pager=more

I hope Author has got the answer ;)
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 24086104
Calling Zone-Admins:--

Can any 'Zone Expert' can edit my username password here??
0
 

Author Comment

by:virtualsolver
ID: 24086311
ok that one should work
i am currently out of office, let me just check the commandi will come back

0
 

Author Closing Comment

by:virtualsolver
ID: 31567393
~thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do I make my main Chrome profile a shorcut like other profiles? 6 38
BgInfo help 5 57
CentOs root password/fsck issue 7 30
SBS 2011 server backup failing. 27 39
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question