On Wed, 2007-03-21 at 22:12 +0100, Uno Engborg wrote: > Is it possible to set a user's default database for MySQL database? > > Instead of having an additional line of command, i.e: > > mysql> use database <database_name> > > the user should just type mysql and directly end up in the right database. > the configuration should include database and password > > > > The reason I want this is that I want tobe able to create a login that > uses mysql > as shell to allow for easy access to a certain database. ---- cat ~/.my.cnf [mysql] user=craig password=My_Password [mysqldump] user=craig password=My_Password [mysqladmin] user=craig password=My_Password of course in this case, host=localhost is assumed but if it were something else, you could change that too. -- Craig White <craig@xxxxxxxxxxxxx>