Docs / Configure

Databases

Updated

SayQL connects straight from your computer to your database. There's no SayQL server in between.

Click New connection in the top bar, pick the type, fill in the details and click Test, then Save. Passwords are stored in your system keychain.

Production connections

Tick This is a production database under Production in the connection's settings and it shows a red PROD badge in the navigator, on its tabs, in the top bar and in the status bar. It's a label only: it doesn't change how queries run.

Connecting

SayQL doesn't connect to anything on its own when it starts. The tabs you had open come back dimmed with Not connected and a Connect button (also in the navigator and the status bar). A connection opens when you click it in the navigator, click Connect, run a query or ask a question. AI apps over MCP are separate: sayql-mcp opens the connections they ask for, as before.

Have a connection string? Paste it into Connection string at the top and SayQL fills in the rest, including the password. It reads URLs (postgres://, mysql://, sqlserver://), JDBC (jdbc:postgresql://, jdbc:sqlserver://) and key=value strings such as Server=…;Initial Catalog=…. The string isn't kept, and the password is saved to the keychain only when you click Save.

TypeDefault portNotes
PostgreSQL5432Turn on Require SSL for hosted databases.
MySQL / MariaDB3306Turn on Require SSL if your server requires it.
SQL Server / Azure SQL1433Azure SQL needs Encrypt connection, which is on by default.
SQLite—Pick the database file. A file is one database.

Tested versions

SayQL is tested against real servers of each of these versions, and a pull request can't land without the tests passing against one PostgreSQL, MySQL, MariaDB and SQL Server version.

DatabaseTestedGood to know
PostgreSQL13, 15, 16, 17Partitioned tables appear once, under the parent. Materialized views are listed.
MySQL5.7, 8.0, 8.4All password types, with or without SSL.
MariaDB10.6, 10.11, 11.4ed25519 accounts sign in too, and JSON columns show as JSON.
SQL Server2019, 2022Also Azure SQL. geometry, geography and hierarchyid show as text, and money exactly.
SQLite3 (bundled)Reads use a connection opened read-only.

Click Cancel to stop a slow query on the server. The full results, and every known limitation, are in Database compatibility.

Use a read-only login

SayQL runs queries read-only and asks before anything that changes data. A login that can only read makes your database enforce that too. MySQL and SQL Server can't fully enforce read-only for a login that could write, so a read-only login matters most there.

  • PostgreSQL: a role with CONNECT, USAGE on the schema and SELECT on its tables.
  • MySQL / MariaDB: a user with SELECT, SHOW VIEW on the database.
  • SQL Server / Azure SQL: a user in the db_datareader role.

Every database on the server

For server databases, the navigator lists every database your login can open, under Databases. Click one to open it. The Database field in the connection only sets which one opens first; leave it empty to use the server's default.

SQL Server tips

  • Internal SQL Servers often use a self-signed certificate. If connecting fails with a certificate error, turn on Trust server certificate, but only for servers you know.
  • If the login works in other tools but not here, set the database to master (or leave it empty) and pick your database from the navigator.

The demo database

SayQL comes with Demo store, a small SQLite shop with customers, orders and products, so you can try everything without connecting anything. Delete it with a right-click if you don't need it.

Something missing or unclear? Ask in Discussions.