public function checkMySQLConnection()
 {
     $service_id = $this->service_prefix . "mysql";
     try {
         $result = DB::selectOne('SELECT 1 AS n');
         if ($result->n != 1) {
             throw new Exception("Unexpected Database Connection Result", 1);
         }
         $this->consul_client->checkPass($service_id);
     } catch (Exception $e) {
         $this->consul_client->checkFail($service_id, $e->getMessage());
         Log::warning("Database Connection Failed: " . $e->getMessage());
     }
 }
 protected function release_Mysql($id)
 {
     $result = DB::selectOne(DB::raw('SELECT RELEASE_LOCK(?) AS released'), [$id]);
     return !!$result->released;
 }