I installed LAMP on Ubuntu 12.04 LTS (Precise Pangolin) and then set root password on phpMyAdmin. I forgot the password and now I am unable to login. When I try to chan
I had a similar problem. mysql wouldn't start:
sudo service mysql start
start: Job failed to start
If I disabled apparmor:
sudo aa-complain /etc/apparmor.d/*
the problem went away. The issue was that mysqld was trying to access /run/mysqld/mysqld.sock but the apparmor profile only gave permission to /var/run/mysqld/mysqld.sock (/var/run is symlinked to /run, so these are actually the same). Not sure why mysqld isn't using the var path since that's what's set in all the configuration files, but you can fix the problem by adding the following to /etc/apparmor.d/usr.sbin.mysqld
/run/mysqld/mysqld.pid rw,
/run/mysqld/mysqld.sock rw,