Connecting to MySQL without passwd prompt

If you are (like me) annoyed by providing password at every mysql login, you can skip it. Also it makes easier programmatic access to any MySQL db, as not passwd prompting is necessary 🙂
Create `~/.my.cnf` file:

[bash]
[client]
user=username
password="pass"

[mysql]
user=username
password="pass"
[/bash]

And login without `-p` parameter:
[bash]
mysql -h host -u username dbname
[/bash]

If you want to use `~/.my.cnf` file in MySQLdb, just connect using this:
[python]
import MySQLdb
cnx = MySQLdb.connect(host=host, port=port, read_default_file="~/.my.cnf")
[/python]