Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] MySQL + less
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
beandog
Developer
Developer


Joined: 04 May 2003
Posts: 2063
Location: /usa/utah

PostPosted: Sat Oct 16, 2004 6:23 am    Post subject: [TIP] MySQL + less Reply with quote

[TIP] MySQL + less

Problem: MySQL doesn't enable a pager by default and so any queries that are more than one page just scroll on by like the latest emerge, leaving you in the dust.

Solution: Use a pager so you can see whats going on AND don't prompt me to scroll down if there's less than one page!

Add this to ~/.my.cnf:

Code:
[client]
pager=/usr/bin/less -F


Edit:

Ive been having problems with the screen blanking in X using a terminal (but it doesnt seem to do it in console only mode), so I found this line in /etc/dispatch-conf.conf to use as the pager. Might want to try that instead, if the above doesn't work:

Code:
[client]
pager=/usr/bin/less --no-init --QUIT-AT-EOF


or, to have it enabled on all mysql connections for that server, put the same code in /etc/mysql/my.cnf

Enjoy

Steve
_________________
If it ain't broke, tweak it. packages | dvds | blurays | blog | wiki


Last edited by beandog on Wed Oct 20, 2004 3:23 pm; edited 2 times in total
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Sat Oct 16, 2004 7:06 am    Post subject: Reply with quote

Nifty....very nifty. I like it. Thanx for the tip :)
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
S_aIN_t
Guru
Guru


Joined: 11 May 2002
Posts: 488
Location: Ottawa

PostPosted: Sat Oct 16, 2004 9:56 am    Post subject: Reply with quote

thanks... didn't know you could do this.. :D
_________________
"That which is overdesigned, too highly
specific, anticipates outcome; the anicipation of
outcome guatantees, if not failure, the
absence of grace."
- William Gibson, "All Tomorrow's Parties"
----
http://petro.tanreisoftware.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum