Configuring MySQL .my.cnf

Add following content

Replace DBPASSWORD with your MySQL root password.

Now set permission for this file to 600, so no user other than root can see it.