multiple [client] entries in .my.cnf?
Mark Street
jet at sonic.net
Tue Jan 14 22:56:45 PST 2003
How about an alias or shell script in bash!!! And here I thought you wanted
to connect to multiple hosts....
alias biff='mysql -hscrew.the.riaa.org -ubiff'
with a shell script you could even pass it a parameter for the database you
want to work with.
#!/bin/bash
exec mysql -hscrew.the.riaa.org -ubiff ...yada yada yada. $1
On Tuesday 14 January 2003 22:38, troy wrote:
> On Tue, Jan 14, 2003 at 10:58:25AM -0800, Mark Street wrote:
> > [client]
> > host=goofy.disney.com
> > user=goofy
> > password=yuck
> >
> > [client]
> > host=mickey.disney.com
> > user=minnie
> > password=mouse
>
> Yuck, I *hate* disney :)
> Well, the issue is I connect as multiple users to the
> same host(s). So I was hoping for something like:
>
> [client]
> alias=biff
> user=biff
> host=screw.the.riaa.org
> password=yuck
>
> [client]
> alias=joebob
> user=joebob
> host=screw.the.riaa.org
> password=foo
>
> Not a biggie, my wrapper hack works well enough. I thought there might
> be a builtin (and thus, cleaner) way to do this.
>
> thanks for the suggestion though.
>
> -t
--
Mark Street, D.C.
Red Hat Certified Engineer
Cert# 807302251406074
--
Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0
GPG key http://www.streetchiro.com/pubkey.asc
More information about the talk
mailing list