I\'m getting this error
ERROR 2002 (HY000): Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysql.sock\' (2)
even though
On Debian this was a bind problem for me so changing bind-address from localhost to 0.0.0.0 helped.
bind-address
localhost
vim /etc/mysql/my.cnf
bind-address = 0.0.0.0