Cannot connect to MySQL server

2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Please make sure of the following:

Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /var/www/sessions.php on line 75
Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /var/www/sessions.php on line 76
Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /var/www/sessions.php on line 77
Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /var/www/sessions.php on line 84