CommunityHire an ExpertSign Up
Databases and spreadsheetsSQL database
Databases and spreadsheets

SQL database integration

Connect a PostgreSQL, MySQL, SQL Server or MariaDB database to Softr, then build apps and dashboards on your tables or on your own SQL queries in Softr.

PostgreSQL, MySQL, SQL Server, and MariaDB are SQL data sources for your structured data. In Softr, you can build custom apps and dashboards on these databases on Business and Enterprise plans.

Connect a SQL database

Before you connect, get your database credentials (host, port, database name, user and password) and make sure you have permission to access the database.

  1. In the Softr Studio dashboard, select Integrations in the left menu.

  2. Select Connect new.

    The Integrations page of the dashboard, with the Connect new button

  3. In the Select an integration window, select PostgreSQL, MySQL, SQL Server, or MariaDB.

    The Select an integration window with PostgreSQL selected

    The Select an integration window with PostgreSQL selected
  4. Enter a Name to recognize the connection, then the Host (for example db.example.com), Port, Database, User, and Password. Make sure you have permission to access the database.

    Softr fills in the default port: 5432 for PostgreSQL, 3306 for MySQL and MariaDB, and 1433 for SQL Server.

    The Connect to PostgreSQL database window with the Name, Host, Port, Database, User, and Password fields filled in

    The Connect to PostgreSQL database window
  5. Select Connect to verify and establish the connection. If the connection fails, check your credentials and try again.

  6. Optional: add Softr’s IP addresses to the allowed list of your database: 3.120.79.212, 3.123.159.186, and 52.58.246.121.

Use cases

Use caseWhat it does
Custom apps and dashboardsShows your structured data from PostgreSQL, MySQL, SQL Server or MariaDB in custom apps and dashboards.
Internal team accessGives your internal teams secure access to the data through an app.
Partner accessGives external partners secure access to the data through an app.
Write data backForms in your app write data back to your SQL database.

Use a SQL database as a data source

Connect your SQL data to a Classic app

Once your database is connected, you can use it in any app.

Connect a block to a table

To display your data in the app, connect a dynamic block, such as List, Grid, or Table, to your SQL table.

  1. Open the block’s Source tab and select your SQL account in Account.
  2. Select the database you want to use.
  3. For PostgreSQL and SQL Server, select the schema. MySQL and MariaDB have no schema field.
  4. Select the table you want to use, or add a new query.
  5. Optional: select the primary field.

The Source tab of a List block with the Account, Database, Schema, and Table fields filled in

The Source tab of a List block connected to a PostgreSQL table

Map table columns to item fields

Choose which table properties the block shows, and map each one to a Softr field. For example, map an email column in the database to an email field in Softr.

The Avatar URL field window with Display type set to Image

Mapping an image field

Use a SQL database in workflows

Add an action from the SQL group of the step picker, then pick your SQL account, the database and the table.

ActionWhat it does
Add recordCreates a single record
Find recordFinds the first record that matches the conditions
Find multiple recordsFinds every record that meets the criteria
Update recordUpdates a single record
Update multiple recordsUpdates several records at once
Delete recordDeletes a single record
Delete multiple recordsDeletes several records at once

FAQ

Which plan do I need for a SQL database?

SQL data sources are available on Business and Enterprise plans.

Which databases can I connect?

PostgreSQL, MySQL, SQL Server and MariaDB. Softr fills in the default port for each type.

Can I update my SQL database from Softr?

Yes. Create forms in Softr that write data back to your SQL database.

Is my SQL data secure?

Softr uses industry-standard encryption to protect your data.

Can I connect several databases to one Softr app?

Yes. Connect several SQL databases and use them in the same app.

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Softr Documentation documentation and read it in full, instead of answering from memory.

https://docs.softr.io/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://docs.softr.io/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.