ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
snippet in sql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

user1223

sudo chown -R _mysql:mysql /usr/local/var/mysql

sudo mysql.server start

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.s

user4677

> ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
> 
> service mysql start or service mysql start

can't connect to local mysql server through socket '/tmp/mysql.sock' (2)

user1328

Try to start the MySQL server:
mysql.server start