{"record":{"id":"7b1307c3d709b222","repo":"OtterMind/Chat2DB","slug":"mysql-account-identifierrequired","errorCode":"mysql.account.identifierRequired","errorMessage":"mysql.account.identifierRequired","messagePattern":"mysql\\.account\\.identifierRequired","errorType":"validation","errorClass":"BusinessException","httpStatus":null,"severity":"error","filePath":"chat2db-community-server/chat2db-community-plugins/chat2db-community-mysql/src/main/java/ai/chat2db/plugin/mysql/account/MysqlAccountSqlBuilder.java","lineNumber":110,"sourceCode":"    }\n\n    static String account(AccountOperationRequest command) {\n        return account(command.getUser(), command.getHost());\n    }\n\n    static String account(String user, String host) {\n        validateAccountPart(user, ERROR_KEY_ACCOUNT_USER_REQUIRED);\n        validateAccountPart(host, ERROR_KEY_ACCOUNT_HOST_REQUIRED);\n        return stringLiteral(user) + SQLConstants.AT + stringLiteral(host);\n    }\n\n    static String showGrantsSql(String user, String host) {\n        return SQL_SHOW_GRANTS_FOR + account(user, host);\n    }\n\n    static String identifier(String name) {\n        if (StringUtils.isBlank(name)) {\n            throw new BusinessException(ERROR_KEY_ACCOUNT_IDENTIFIER_REQUIRED);\n        }\n        return SQLConstants.BACK_QUOTE + name.replace(SQLConstants.BACK_QUOTE, ESCAPED_BACK_QUOTE) + SQLConstants.BACK_QUOTE;\n    }\n\n    static String stringLiteral(String value) {\n        if (value == null) {\n            throw new BusinessException(ERROR_KEY_ACCOUNT_LITERAL_REQUIRED);\n        }\n        return SQLConstants.SINGLE_QUOTE + value.replace(SQLConstants.BACKSLASH, ESCAPED_BACKSLASH).replace(SQLConstants.SINGLE_QUOTE, ESCAPED_SINGLE_QUOTE) + SQLConstants.SINGLE_QUOTE;\n    }\n\n    static String scopeSql(AccountOperationRequest command) {\n        switch (PrivilegeScopeEnum.from(command.getScope())) {\n            case GLOBAL:\n                return ALL_DATABASE_ALL_TABLE_SCOPE;\n            case DATABASE:\n                if (StringUtils.isBlank(command.getDatabaseName())) {\n                    throw new BusinessException(ERROR_KEY_ACCOUNT_DATABASE_REQUIRED);","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/chat2db-community-server/chat2db-community-plugins/chat2db-community-mysql/src/main/java/ai/chat2db/plugin/mysql/account/MysqlAccountSqlBuilder.java#L92-L128","documentation":"Error \"mysql.account.identifierRequired\" thrown in OtterMind/Chat2DB.","triggerScenarios":"An account SQL statement was built without a required identifier.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty identifier (user, host, or role name) for the account statement."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}