Add a database user
create_database_userCreates a user with a generated password, returned here once (also readable with get_database_credentials); live within seconds. Up to 30 users. It connects only to its databases (every logical database, future ones included, when databases is omitted): it reads and writes everything there and creates tables (on PostgreSQL in public too), or only reads with read_only; elsewhere it has no access. Its connection_uri points to defaultdb, or to its first database without access to defaultdb. On Valkey, an ACL user with every key and data command (no databases, no read_only). Treat the password as a secret. Scope: databases.write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database id, as returned by list_databases or create_database. | |
| username | Yes | Lowercase letters, digits and _, starting with a letter or _. | |
| databases | No | Logical databases it may connect to (existing ones, see get_database). Omit for all of them, future ones included. | |
| read_only | No | SELECT only (MySQL, MariaDB: SELECT and SHOW VIEW). Default false. |