Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error writing my.cnf: Permission denied

Tags:

mysql

ssh

my.cnf

I'm attempting to edit my my.cnf file to allow remote access to mysql (by changing the bind-address). However, I'm getting a "Error writing my.cnf: Permission denied" error when I try to save (using pico through SSH).

Running $ lsattr my.cnf returns ---------------- my.cnf

What do I need to do to be able to edit this file?

Thanks!

like image 428
user994585 Avatar asked Dec 15 '22 14:12

user994585


1 Answers

You need to set the file permission as readable and writable.

sudo chmod 644 my.cnf

sudo nano my.cnf
like image 173
sethupathi Avatar answered Dec 21 '22 16:12

sethupathi