Skip to content

Connecting to a Database

Learn how Database Connections work in Wappler and how to reuse them in Server Actions.

A database connection is the foundation for every Server Connect action that reads or writes data. In this tour, you will look at the connection setup details Wappler needs, understand how driver and credentials affect the target database, and see why this step comes before every query, insert, update, or delete workflow.

Create per target (Dev/Prod)
Reuse in Query/Insert/Update/Delete

Before you can query or modify data, configure a Database Connection for your project target(s). This stores credentials and makes the connection reusable in Server Actions.

Configure a connection per target
Use it across Server Actions

Make sure your Development and Production targets are configured. Connections are typically created per target.

Development vs Production targets
Keep credentials per environment

Once created, select the connection in Database Query/Insert/Update/Delete steps.

Select the connection in DB steps
Avoid duplicating credentials

Return to the Database Operations menu to continue with Queries, Insert, Update, Delete, or Paging.

Go back to Database Operations
Pick the next focused tour

Browse Database Operations tours: Quick Overview, Connections, and Queries.

Choose a Database Operations tour to start.

Get a quick overview of Database Operations: what it is, where to find it, and how it fits in your workflow.

Use this quick overview to place the main database actions in the right order before you build a real flow. You will compare when to query, insert, update, delete, or page records, so the focused operation tours feel like deliberate workflow choices instead of isolated features.

Connect, then Query/Insert/Update/Delete
Pick a focused tour next

Wappler provides powerful visual tools for working with databases. You can connect to MySQL, PostgreSQL, SQL Server, and more.

Supported databases + targets
Use Server Actions for DB logic

First, create a database connection in your project settings. This securely stores your database credentials.

Create connection in project settings
Store credentials securely

In Server Connect, add a Database Query step. Use the visual query builder to select tables, columns, and add filters.

Build queries visually
Add filters/joins/sort

Use the Database Insert step to add new records. Map form fields to database columns visually.

Insert new rows
Map form inputs to columns

The Database Update step lets you modify existing records. Set conditions to update specific records.

Update specific rows only
Prefer allow-lists

Use the Database Delete step to remove records. Always add proper security checks before deleting data.

Confirm intent before deleting
Restrict by auth/session

Return to the Database Operations menu to dive deeper into a specific topic like Queries, Insert, Update, Delete, or Paging.

Go back to Database Operations
Choose a deeper tour next

Browse Database Operations tours: Quick Overview, Connections, and Queries.

Choose a Database Operations tour to start.