Re: Defaults for the mysql client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux