Bah, annoying person :-p TBH, when I think on it, it'd probably not even work, because the env variable you need to set is that of the client, not the server.
I suppose the simplest way of doing this would be to write a wrapper script around the mysql client that sets the editor. On a per-user base, you could have the wrapper check wether another env var, say MYSQL_EDITOR is set, and use that to set EDITOR. Can also be done with a command alias, but those won't work if a user or script specifies the full path name of the command. On Wed, Jan 28, 2009 at 3:42 AM, Xristos Karvouneas <kalamat...@hotmail.com>wrote: > > That would apply across all users then, wouldn't it? What if I wanted to > set it on a per user basis, but only for the MySQL sessions? > > Thanks, > George> Date: Wed, 28 Jan 2009 00:47:07 -0800> Subject: Re: Setting the > value for the EDITOR variable> From: vegiv...@tuxera.be> CC: > mysql@lists.mysql.com> > You need to set that in the script that starts > your mysql daemon, probably> /etc/init.d/mysql or something similar.> > On > Tue, Jan 27, 2009 at 3:44 PM, Xristos Karvouneas> > <kalamat...@hotmail.com>wrote:> > > >> > Dear All,> >> > I would like to be able to do that from the cnf file, > as I want to have a> > different editor for MySQL commands than the one I > use when writing shell> > scripts. When I put the following in the .my.cnf > file,> > [shell]> > EDITOR=/usr/local/bin/pico> > export EDITOR> >> > I get > no error messages when mysql starts up, but the value of the EDITOR> > > variable does not change.> >> > Is there any way I can achieve that from the > cnf file?> >> > Thanks,> > Xristos> > > _________________________________________________________________> > Show > them the way! Add maps and directions to your party invites.> > > http://www.microsoft.com/windows/windowslive/events.aspx> > > > > -- > > Celsius is based on water temperature.> Fahrenheit is based on alcohol > temperature.> Ergo, Fahrenheit is better than Celsius. QED. > _________________________________________________________________ > Invite your mail contacts to join your friends list with Windows Live > Spaces. It's easy! > > http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us -- Celsius is based on water temperature. Fahrenheit is based on alcohol temperature. Ergo, Fahrenheit is better than Celsius. QED.