Skip to content

Commit 6779672

Browse files
committed
thomasgauvin: update pscale postgres
1 parent 9b55806 commit 6779672

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/content/partials/hyperdrive/planetscale-postgres-partial.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,16 @@ You can connect Hyperdrive to any existing PlanetScale PostgreSQL database by cr
1010

1111
### PlanetScale Dashboard
1212

13-
1. Go to the [**PlanetScale dashboard**](https://app.planetscale.com/) and select the Postgres database you wish to connect to.
14-
2. Click **Connect**. Enter `hyperdrive-user` as the password name (or your preferred name) and configure the permissions as desired. Select **Create password**. Note the username and password as they will not be displayed again.
15-
3. Select **Other** as your language or framework. Note down the database host, database name, database username, and password. You will need these to create a database configuration in Hyperdrive.
13+
1. Go to the [**PlanetScale dashboard**](https://app.planetscale.com/) and select the database you wish to connect to.
14+
2. Click **Connect**. Create a new role and password for your Hyperdrive configuration (recommended):
15+
1. Connect to your PlanetScale database from the command line using the `Command line` snippet for your operating system.
16+
2. Generate a secure password.
17+
3. Run the following snippet to create a new role `hyperdrive-user` in your database:
18+
```sql
19+
CREATE ROLE hyperdrive-user WITH LOGIN PASSWORD '<ENTER_PASSWORD_HERE>';
20+
GRANT INSERT, UPDATE, SELECT, DELETE ON ALL TABLES IN SCHEMA public TO hyperdrive-user;
21+
```
22+
3. Note the user, the password, the database host, and the database name. You will need these to create a database configuration in Hyperdrive.
1623

1724
With the host, database name, username and password, you can now create a Hyperdrive database configuration.
1825

0 commit comments

Comments
 (0)