Error: Can not connect to MySQL server

Time: 2018-11-21 7:05am
Script: /index.php

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.