{"record":{"id":"7ac92468ba28208b","repo":"OtterMind/Chat2DB","slug":"mysql-account-userrequired","errorCode":"mysql.account.userRequired","errorMessage":"mysql.account.userRequired","messagePattern":"mysql\\.account\\.userRequired","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":182,"sourceCode":"        validateAccountPart(command.getUser(), ERROR_KEY_ACCOUNT_USER_REQUIRED);\n        validateAccountPart(command.getHost(), ERROR_KEY_ACCOUNT_HOST_REQUIRED);\n    }\n\n    private static void requirePassword(AccountOperationRequest command) {\n        if (StringUtils.isBlank(command.getPassword())) {\n            throw new BusinessException(ERROR_KEY_ACCOUNT_PASSWORD_REQUIRED);\n        }\n    }\n\n    private static void requirePrivileges(AccountOperationRequest command) {\n        if (command.getPrivileges() == null || command.getPrivileges().isEmpty()) {\n            throw new BusinessException(ERROR_KEY_ACCOUNT_PRIVILEGE_REQUIRED);\n        }\n    }\n\n    private static void validateAccountPart(String value, String code) {\n        if (StringUtils.isBlank(value)) {\n            throw new BusinessException(code);\n        }\n        if (value.indexOf('\\0') >= 0) {\n            throw new BusinessException(ERROR_KEY_ACCOUNT_INVALID_ACCOUNT_NAME);\n        }\n    }\n}\n","sourceCodeStart":164,"sourceCodeEnd":189,"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#L164-L189","documentation":"Error \"mysql.account.userRequired\" thrown in OtterMind/Chat2DB.","triggerScenarios":"An account statement was built without a user name.","commonSituations":"See trigger scenarios.","solutions":["Provide the MySQL user name (and host if required) for the account operation."],"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"}