Horje
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Code Example
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
sudo chown -R _mysql:mysql /usr/local/var/mysql

sudo mysql.server start
can't connect to local mysql server through socket '/tmp/mysql.sock' (2)
Try to start the MySQL server:
mysql.server start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.s
> ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
> 
> service mysql start or service mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
systemctl stop mysql

sudo usermod -d /var/lib/mysql/ mysql

systemctl start mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
$ mysql.server start
Source: medium.com
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
sudo chown -R _mysql:mysql /usr/local/var/mysql

sudo mysql.server start





Related
rename table sql Code Example rename table sql Code Example
mysql show all tables Code Example mysql show all tables Code Example
mysql show tables in database Code Example mysql show tables in database Code Example
how to auto increment in sql Code Example how to auto increment in sql Code Example
get all table name in sql through php Code Example get all table name in sql through php Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11