Files
supabase/web/docs/guides/database/managing-passwords.mdx
T

59 lines
1.7 KiB
Plaintext

---
id: managing-passwords
title: "Managing Database Passwords"
description: How to change your PostgreSQL database password.
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Your PostgreSQL database is the core of your Supabase project, so it's important that it has a strong, secure password at all times.
Your passwords should not contain of the following symbols:
`: / ? # ] [ @ ! $ & ' ( ) * + , ; =`
Special symbols can conflict with connection string URLs, so it's best to avoid them. You can make a secure password using a longer string or a randomized set of upper and lowercase letters and digits.
### Changing your project password
When you created your project you were also asked to enter a password. This is actually the password for your database, specifically for the `postgres` user.
You can update this password from the Supabase Dashboard](https://supabase.io):
> @TODO: clean this up. Also we should generate a random passowrd in the code snippet below otherwise everyone will copy/paste the same password.
- Home
- Select a Project
- SQL
- New Query
<Tabs
defaultValue="SQL"
values={[
{label: 'SQL', value: 'SQL'},
]}>
<TabItem value="SQL">
```sql
alter user postgres
with password 'new_password';
```
</TabItem>
</Tabs>
## Creating a secure password
- use a password manager to generate it
- make a long password (10 characters at least)
- don't use any common dictionary words
- use both upper and lower case characters, numbers, and any symbols not in the list above
## Resources
- [Reference: Database Passwords](/docs/reference/postgres/database-passwords)
- [PostgreSQL ALTER USER Documentation](https://www.postgresql.org/docs/12/sql-alteruser.html)