OtterMind/Chat2DB · error · BusinessException

mysql.account.invalidAccountName

mysql.account.invalidAccountName

Error message

mysql.account.invalidAccountName

What it means

Error "mysql.account.invalidAccountName" thrown in OtterMind/Chat2DB.

Source

Thrown at chat2db-community-server/chat2db-community-plugins/chat2db-community-mysql/src/main/java/ai/chat2db/plugin/mysql/account/MysqlAccountSqlBuilder.java:185

    private static void requirePassword(AccountOperationRequest command) {
        if (StringUtils.isBlank(command.getPassword())) {
            throw new BusinessException(ERROR_KEY_ACCOUNT_PASSWORD_REQUIRED);
        }
    }

    private static void requirePrivileges(AccountOperationRequest command) {
        if (command.getPrivileges() == null || command.getPrivileges().isEmpty()) {
            throw new BusinessException(ERROR_KEY_ACCOUNT_PRIVILEGE_REQUIRED);
        }
    }

    private static void validateAccountPart(String value, String code) {
        if (StringUtils.isBlank(value)) {
            throw new BusinessException(code);
        }
        if (value.indexOf('\0') >= 0) {
            throw new BusinessException(ERROR_KEY_ACCOUNT_INVALID_ACCOUNT_NAME);
        }
    }
}

View on GitHub (pinned to 5ee1e990e7)

Solutions

  1. Use a valid MySQL account name in the form 'user'@'host'.
  2. Remove illegal characters or quoting from the account name.

When it happens

Trigger: The supplied account name failed MySQL account-name validation.

Common situations: See trigger scenarios.


AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14). Data as JSON: /api/errors/58854da505122208. Report an issue: GitHub.