Unable to connect to the database server: Lost connection to MySQL server during query