Warning: PHP Startup: MySQL server has gone away in /connection.php on line 6

Warning: PHP Startup: Error while reading greeting packet. PID=4326 in /connection.php on line 6
Connection failed: SQLSTATE[HY000] [2006] MySQL server has gone away
Fatal error: Call to a member function query() on null in /connection.php on line 12