Connect to Database
connectEstablish a runtime database connection using a connection URL, supporting MySQL, PostgreSQL, SQLite, and more. Save the connection under an alias for later use in the session.
Instructions
Connect to a database at runtime with a connection URL (mysql, mariadb, postgres, sqlite, mssql, clickhouse, mongodb, redis, elasticsearch, opensearch). Not persisted to disk, but kept for the rest of the session under an alias
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Connection URL, e.g. postgres://user@host:5432/db, mongodb://user@host/db, redis://host:6379/0, sqlite:///path/to/file.db. Use host.docker.internal for a database on this machine when running in Docker | |
| alias | No | Name to remember this connection under for use_connection later | |
| password | No | Password, if not in the URL. Avoids percent-encoding special characters |