OtterMind/Chat2DB · error · BusinessException
mysql.account.actionUnsupported
mysql.account.actionUnsupported
Error message
mysql.account.actionUnsupported
What it means
Error "mysql.account.actionUnsupported" 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:72
}
case ALTER_PASSWORD -> {
requirePassword(command);
yield SQL_ALTER_USER + account(command) + SQL_IDENTIFIED_BY + passwordLiteral(command, maskSensitive);
}
case LOCK_ACCOUNT -> SQL_ALTER_USER + account(command) + SQL_ACCOUNT_LOCK;
case UNLOCK_ACCOUNT -> SQL_ALTER_USER + account(command) + SQL_ACCOUNT_UNLOCK;
case DROP_USER -> SQL_DROP_USER + account(command);
case GRANT_PRIVILEGE -> {
requirePrivileges(command);
yield SQL_GRANT + privilegeList(command.getPrivileges()) + SQLConstants.SQL_ON + scope(command) + SQLConstants.SQL_TO
+ account(command) + (Boolean.TRUE.equals(command.getGrantOption()) ? SQL_WITH_GRANT_OPTION : SQLConstants.EMPTY);
}
case REVOKE_PRIVILEGE -> {
requirePrivileges(command);
yield SQL_REVOKE + privilegeList(command.getPrivileges()) + SQLConstants.SQL_ON + scope(command) + SQL_FROM
+ account(command);
}
default -> throw new BusinessException(ERROR_KEY_ACCOUNT_ACTION_UNSUPPORTED);
};
}
private static String passwordLiteral(AccountOperationRequest command, boolean maskSensitive) {
return maskSensitive ? MASKED_PASSWORD_LITERAL : stringLiteral(command.getPassword());
}
static String previewToken(String sql) {
try {
MessageDigest digest = MessageDigest.getInstance(SHA_256_ALGORITHM);
byte[] hash = digest.digest(sql.getBytes(StandardCharsets.UTF_8));
StringBuilder builder = new StringBuilder();
for (byte b : hash) {
builder.append(String.format(HEX_BYTE_FORMAT, b));
}
return builder.toString();
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException(e);View on GitHub (pinned to 5ee1e990e7)
Solutions
- Use a supported account action (create, alter, drop, grant, revoke) when building account SQL.
When it happens
Trigger: MysqlAccountSqlBuilder received an action it cannot render into SQL.
Common situations: See trigger scenarios.
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/f35ce8b359689b0c.
Report an issue: GitHub.