Configuring MySQL .my.cnf

vi ~/.my.cnf

Add following content

[client]
user = root
password = "DBPASSWORD"

[mysqladmin]

user = root password = “DBPASSWORD”

Advertisement

[mysqldump]

user = root password = “DBPASSWORD”

Replace DBPASSWORD with your MySQL root password.

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

chmod 600 ~/.my.cnf
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement