Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions flyctl/cmd/fly_mpg_connect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,33 @@ title: fly mpg connect
source_url: https://docs.fly.io/flyctl/cmd/fly_mpg_connect
---

Connect to a MPG database using psql
Connect to a MPG database using psql.

With --command or --file, psql stops at the first SQL error and skips its
startup file. See the examples for scripted usage.

## Usage
```
fly mpg connect <CLUSTER ID> [flags]
```
## Examples

```
fly mpg connect <CLUSTER_ID> -c 'select count(*) from orders'
fly mpg connect <CLUSTER_ID> -f migrations.sql
fly mpg connect <CLUSTER_ID> -c 'select * from orders' -- --csv -t
# Piped SQL keeps psql defaults; enable ON_ERROR_STOP explicitly:
cat queries.sql | fly mpg connect <CLUSTER_ID> -- -v ON_ERROR_STOP=1
fly mpg connect <CLUSTER_ID> --database app --username reader -c 'select current_user'
```
## Options

```
-d, --database string The database to connect to
-h, --help help for connect
-u, --username string The username to connect as
-c, --command stringArray The SQL command to run and exit (repeatable; mutually exclusive with --file)
-d, --database string The database to connect to
-f, --file stringArray The SQL file to run and exit (repeatable, - for stdin; mutually exclusive with --command)
-h, --help help for connect
-u, --username string The username to connect as
```
## Global Options

Expand Down
2 changes: 1 addition & 1 deletion flyctl/cmd/fly_tokens_create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: fly tokens create
source_url: https://docs.fly.io/flyctl/cmd/fly_tokens_create
---

Create Fly.io API tokens
Create Fly.io API tokens The token is printed with its authorization scheme, as in "FlyV1 fm2_...". The "FlyV1 " prefix and the space after it are part of the token: copy the whole string, and quote it when you set it in a shell or a secret.

## Usage
```
Expand Down
2 changes: 1 addition & 1 deletion flyctl/cmd/fly_tokens_create_deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: fly tokens create deploy
source_url: https://docs.fly.io/flyctl/cmd/fly_tokens_create_deploy
---

Create an API token limited to managing a single app and its resources. Also available as TOKENS DEPLOY. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical.
Create an API token limited to managing a single app and its resources. Also available as TOKENS DEPLOY. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical. The token is printed with its authorization scheme, as in "FlyV1 fm2_...". The "FlyV1 " prefix and the space after it are part of the token: copy the whole string, and quote it when you set it in a shell or a secret.

## Usage
```
Expand Down
2 changes: 1 addition & 1 deletion flyctl/cmd/fly_tokens_create_machine-exec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: fly tokens create machine-exec
source_url: https://docs.fly.io/flyctl/cmd/fly_tokens_create_machine-exec
---

Create an API token that can execute a restricted set of commands on a machine. Commands can be specified on the command line or with the command and command-prefix flags. If no command is provided, all commands are allowed. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical.
Create an API token that can execute a restricted set of commands on a machine. Commands can be specified on the command line or with the command and command-prefix flags. If no command is provided, all commands are allowed. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical. The token is printed with its authorization scheme, as in "FlyV1 fm2_...". The "FlyV1 " prefix and the space after it are part of the token: copy the whole string, and quote it when you set it in a shell or a secret.

## Usage
```
Expand Down
2 changes: 1 addition & 1 deletion flyctl/cmd/fly_tokens_create_org.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: fly tokens create org
source_url: https://docs.fly.io/flyctl/cmd/fly_tokens_create_org
---

Create an API token limited to managing a single org and its resources. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical.
Create an API token limited to managing a single org and its resources. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical. The token is printed with its authorization scheme, as in "FlyV1 fm2_...". The "FlyV1 " prefix and the space after it are part of the token: copy the whole string, and quote it when you set it in a shell or a secret.

## Usage
```
Expand Down
2 changes: 1 addition & 1 deletion flyctl/cmd/fly_tokens_create_readonly.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: fly tokens create readonly
source_url: https://docs.fly.io/flyctl/cmd/fly_tokens_create_readonly
---

Create an API token limited to reading a single org and its resources. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical.
Create an API token limited to reading a single org and its resources. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical. The token is printed with its authorization scheme, as in "FlyV1 fm2_...". The "FlyV1 " prefix and the space after it are part of the token: copy the whole string, and quote it when you set it in a shell or a secret.

## Usage
```
Expand Down
2 changes: 1 addition & 1 deletion flyctl/cmd/fly_tokens_create_ssh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: fly tokens create ssh
source_url: https://docs.fly.io/flyctl/cmd/fly_tokens_create_ssh
---

Create token for SSH'ing to a single app. To be able to SSH to an app, this token is also allowed to connect to the org's wireguard network.
Create token for SSH'ing to a single app. To be able to SSH to an app, this token is also allowed to connect to the org's wireguard network. The token is printed with its authorization scheme, as in "FlyV1 fm2_...". The "FlyV1 " prefix and the space after it are part of the token: copy the whole string, and quote it when you set it in a shell or a secret.

## Usage
```
Expand Down
2 changes: 1 addition & 1 deletion flyctl/cmd/fly_tokens_create_wireguard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: fly tokens create wireguard
source_url: https://docs.fly.io/flyctl/cmd/fly_tokens_create_wireguard
---

Create an API token limited to WireGuard peer management for an organization. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical.
Create an API token limited to WireGuard peer management for an organization. Tokens are valid for 20 years by default. We recommend using a shorter expiry if practical. The token is printed with its authorization scheme, as in "FlyV1 fm2_...". The "FlyV1 " prefix and the space after it are part of the token: copy the whole string, and quote it when you set it in a shell or a secret.

## Usage
```
Expand Down
Loading