'Parameters passed to this function will override defaults from global
config.  try_reconnecting, if passed, will override
self.reconnect_enabled.'

def connect(self, db_type=None, host=None, username=None, password=None, db_name=None, try_reconnecting=None):

    self.disconnect()
    self._read_options(db_type, host, username, password, db_name)
    self._backend = self._get_backend(self.db_type)
    _copy_exceptions(self._backend, self)
    self._connect_backend(try_reconnecting)
