infiniflow/ragflow · error · ValueError

For the security reason, it does not support database named

Error message

For the security reason, it does not support database named rag_flow.

What it means

Error "For the security reason, it does not support database named rag_flow." thrown in infiniflow/ragflow.

Source

Thrown at agent/tools/exesql.py:62

        self.database = ""
        self.username = ""
        self.host = ""
        self.port = 3306
        self.password = ""
        self.max_records = 1024

    def check(self):
        self.check_valid_value(self.db_type, "Choose DB type", ["mysql", "postgres", "mariadb", "mssql", "IBM DB2", "trino", "oceanbase"])
        self.check_empty(self.database, "Database name")
        self.check_empty(self.username, "database username")
        self.check_empty(self.host, "IP Address")
        self.check_positive_integer(self.port, "IP Port")
        if self.db_type != "trino":
            self.check_empty(self.password, "Database password")
        self.check_positive_integer(self.max_records, "Maximum number of records")
        if self.database == "rag_flow":
            if self.host == "ragflow-mysql":
                raise ValueError("For the security reason, it does not support database named rag_flow.")
            if self.password == "infini_rag_flow":
                raise ValueError("For the security reason, it does not support database named rag_flow.")

    def get_input_form(self) -> dict[str, dict]:
        return {"sql": {"name": "SQL", "type": "line"}}


class ExeSQL(ToolBase, ABC):
    component_name = "ExeSQL"

    @timeout(int(os.environ.get("COMPONENT_EXEC_TIMEOUT", 60)))
    def _invoke(self, **kwargs):
        if self.check_if_canceled("ExeSQL processing"):
            return

        def convert_decimals(obj):
            from decimal import Decimal
            import math

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Do not use the reserved database name 'rag_flow'; choose another database.

Example fix

database = 'analytics'  # not 'rag_flow'

When it happens

Trigger: Thrown at agent/tools/exesql.py:62 when the library encounters an invalid state.

Common situations: An ExeSQL tool is configured to query the internal rag_flow database, which is blocked for security; pointing the tool at a different database prevents this error.


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/5e7ad825152cf067. Report an issue: GitHub.