Error: Can not connect to MySQL server

Time: 2018-11-17 11:11pm
Script:

Error: Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)
Errno.: 2002

Similar error report has beed dispatched to administrator before.