Handle server close mysql connection