def get_connection_string(params, hide_password=True):
        connection_string = params['driver'] + '://'
        user = params.get('user', None)
        password = params.get('password', None)
        host = params.get('host', None)
        port = params.get('port', None)
        database = params.get('database', None)
        if database is None:
            raise ValueError("Field 'database' of connection parameters cannot be None.")
        if password is None and user is not None:
            password = Client._get_password(params)
            if password is None:
                raise RuntimeError("Password not defined and not available in keyring.")
        if host is not None:
            if user is not None:
                connection_string += user
                if len(password) > 0:
                    if hide_password:
                        connection_string += ":[password hidden]"
                    else:
                        connection_string += ":" + password
                connection_string += "@"
            connection_string += host
            if port is not None:
                connection_string += ':' + str(port)
        connection_string += '/' + database
        return connection_string