Configuring MySQL .my.cnf

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
Need help with Linux Server or WordPress? We can help!

Leave a Reply

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