why I cannot cd into /var/lib/mysql

user3889486 picture user3889486 · Feb 11, 2015 · Viewed 39.8k times · Source

The structure is the following

ravas@ravas-desk-lmde /var/lib $ pwd
/var/lib
ravas@ravas-desk-lmde /var/lib $ ls -l | grep mysql
drwx------ 13 mysql   mysql   4096 Feb 10 22:32 mysql

When I try to get into /var/lib/mysql, I don't have rights

ravas@ravas-desk-lmde /var/lib $ cd mysql/
bash: cd: mysql/: Permission denied

though I belong to the mysql group

ravas@ravas-desk-lmde /var/lib $ groups ravas 
ravas : ravas adm dialout cdrom floppy sudo audio dip video plugdev lpadmin sambashare mysql

What's the problem here?

Answer

zombie_ghast picture zombie_ghast · Oct 3, 2015
sudo -i

then

cd /var/lib/mysql/