vi ~/.my.cnf
Add following content
[client] user = root password = "DBPASSWORD" [mysqladmin] user = root password = "DBPASSWORD" [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
Leave a Reply