Database Support

April 12, 2026 ยท View on GitHub

To create and save a database connection to be used with other squix commands, use the init command

init <name> <type> <conn-string> [schema]

If the is ommited, squix will try to infer the database type from the connection string

Init Examples

PostgreSQL

squix init pg-prod postgres postgres://myuser:mypassword@localhost:5432/mydb?sslmode=disable

# or connect to a specific schema:
squix init pg-prod postgres postgres://myuser:mypassword@localhost:5432/mydb?sslmode=disable schema-name

MySQL / MariaDB

squix init mysql-dev mysql 'myuser:mypassword@tcp(127.0.0.1:3306)/mydb'

squix init mariadb-docker mariadb "root:MyStrongPass123@tcp(localhost:3306)/forestgrove"

SQL Server

squix init sqlserver-docker sqlserver "sqlserver://sa:MyStrongPass123@localhost:1433/master"

SQLite

squix init sqlite-local sqlite file:///home/eduardo/dbeesly/sqlite/mydb.sqlite

DuckDB

Requires CGO (included by default; excluded by building with CGO_ENABLED=0).

squix init duckdb-local duckdb /path/to/mydb.db

DuckDB can also query CSV and JSON files directly:

squix init duckdb-local duckdb employees.json
squix init duckdb-local duckdb employees.csv

For json and csv, the data will be available to query as a view, with the same name as the file (eg. squix run "select * from employees" from the employees.json file)

Oracle

squix init oracle-stg oracle "oracle://myuser:mypassword@localhost:1521/XEPDB1"

# or connect to a specific schema:
squix init oracle-stg oracle "oracle://myuser:mypassword@localhost:1521/XEPDB1" schema-name

ClickHouse

squix init clickhouse-docker clickhouse "clickhouse://myuser:mypassword@localhost:9000/forestgrove"

FireBird

squix init firebird-docker firebird user:masterkey@localhost:3050//var/lib/firebird/data/the_office

๐Ÿ Dbeesly

To run containerized test database servers for all supported databases, use the sister project dbeesly

image