Login to a terminal as root on Ubuntu Linux.
I recently found myself needing to directly access /var/lib/mysql
on Ubuntu. I could not cd into the directory, not even using sudo
. I resolved this by logging into the terminal as root. Running the command sudo -i
will log you into the terminal as root. Then it was simple case of running cd /var/lib/mysql
.
sudo -i