# dflow db:link

> Bind a ready service to an application and redeploy.

Web page: /docs/cli/data/db-link/

This connects a ready database to an application and redeploys that application so it receives the connection settings. PostgreSQL, MySQL, and MongoDB write `DFLOW_DATABASE_*`. Redis writes `DFLOW_REDIS_*`. The Redis provider id is `redis`. A service that is not ready yet is refused.

```bash
dflow db:link SERVICE APP
```

## Flags

`--wait` defaults to true. `--wait-timeout` defaults to 5m.

## What you see

The application is redeployed with the binding. SQL and MongoDB receive `DFLOW_DATABASE_*`. Redis receives `DFLOW_REDIS_*`.

## When it fails

A service that is not ready is refused.
