multiple [client] entries in .my.cnf?
troy
fryman at sonic.net
Wed Jan 15 00:03:10 PST 2003
On Tue, Jan 14, 2003 at 10:56:45PM -0800, Mark Street wrote:
> How about an alias or shell script in bash!!! And here I thought you wanted
> to connect to multiple hosts....
That too. Multiple users, multiple hosts. It's a small world, after
all.
Anyway this is what I've been using. Works well enough, I was just
curious about other solutions.
function m
{
PROG=$1
CNF=${HOME}/bin/my.cnf/$2
shift 2
$PROG --defaults-file=${CNF} $*
}
That way I can use multiple mysql tools, and I don't need to specify
passwords interactively or on the command line (where other users could
see them...)
usage would be something like:
m mysql [alias] [database]
or
m mysqldump [alias] [args]
etc...
Anyway, I think I've bored everyone enough with this simple little
thing.
-ta
More information about the talk
mailing list