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 just experienced the same issue after I had to restart my production server. I am running Debian 8.1 (Jessie) on a DigitalOcean droplet.
This is what I did to resolve my issue:
Check if the file /var/run/mysqld/mysqld.sock
exists. If it doesn't, manually create it by entering touch /var/run/mysqld/mysqld.sock
(which is what I had to do).
So the MySQL process can use this file. Change ownership of said file by entering chown mysql /var/run/mysqld/mysqld.sock
.
Once '2' has been done, restart the MySQL service by entering service mysql restart
or /etc/init.d/mysql restart
.
After going through the above steps, my issue was solved. I rarely have this issue, and there is probably a better way, so by all means provide constructive feedback if need be :).