Define default database in ~/.my.cnf file

~/.my.cnf :

[client]
user=somevalue
password=somevalue2
host=localhost

What do I need to add to .my.cnf file so it will connect to the default database?

it should just be database=databasename