mamma.san wrote:
> A strange qustion, but i was wondering if there was a quick way to log into mysql in terminal on
> OS X without having to type mysql -h localhost -u root -p everytime. This is purely for time saving
> reasons, and I'm sure you might think 'why doesn't he just type it?' but I'm curious.
Why aren't you just typing it in?
Seriously, if you create a .my.cnf file in root's home directory with the following content:
[mysql]
user=root
password=root's password
host=localhost
all you have to type is mysql (at least that's how it works on Linux).
If you leave out the password, you must type mysql -p.
(You decide whether 3 keystrokes less is worth the security risk ;)
--
felix
Please use
BBCode to format your messages in this forum.