title: Configuring .my.cnf in home directory for multiple databases does not work. Works for single database
body: <p>Here is my .my.cnf file:</p>
  
  <pre><code> [client]
   user=user1
   password=somePasswd1
   database=someDb
   [client2]
   user=user1
   password=somePassed2
   database=someotherDb
  </code></pre>
  
  <p>It works if I just have one entry, as in:</p>
  
  <pre><code> [client]
   user=user1
   password=somePasswd1
   database=someDb
  </code></pre>
  
  <p>What is the significance of [client]? What should it have? Also, what if I want to restrict these user-passwords for localhost only?</p>