Here is my .my.cnf file:
[client]
user=user1
password=somePasswd1
database=someDb
[client2]
user=user1
password=somePassed2
database=someotherDb
It works if I just have one entry, as in:
[client]
user=user1
password=somePasswd1
database=someDb
What is the significance of [client]? What should it have? Also, what if I want to restrict these user-passwords for localhost only?