Failed to obtain database handle :SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)

Fatal error: Call to a member function query() on a non-object in /cm4/webtool/lib/database.php on line 332