Mysql command line automatic login
When connecting to mysql on a few different hosts it can save you time, by saving your mysql details in a file that will be used for login.
Create a file like
Insert the following:
[client] host="server1" user="username" password="password" database="database"
In the terminal run the following to use the contents of the file for login:
then you could even create a bash alias in ~/.bash_aliases
alias mysqlserver1='mysql --defaults-file="~/mysql_server1.txt"'
Now all you need to run at the terminal is:
June 27, 2011