Use ping first to check connection status for mysql_adapter