losing connection to MYSQL database

losing connection to MYSQL database when doing any kind of query.