How to specify a specific .my.cnf configuration file in mysql command line?
$ mysql --my-config = .my.cnf
The --defaults-file parameter allows you to specify which parameter files you want to use. It would be nice to give it the full path to your options file.
mysql --defaults-file=/home/user/.my.cnf database
Here: http://dev.mysql.com/doc/refman/5.5/en/option-files.html says that you can also specify "defaults-extra-file" for additional parameters. Otherwise, the default value is my.cnf (depending on the OS).