Connection error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Fatal error: Call to a member function prepare() on a non-object in /home/sloki/user/h43001/sites/smkgrafikadp.com/www/objects/home.php on line 60