Files
supabase/apps/temp-docs/docs/guides/database/managing-passwords.mdx
2022-04-26 14:17:19 +02:00

44 lines
1.4 KiB
Plaintext

---
id: managing-passwords
title: "Passwords"
description: How to change your PostgreSQL database password.
---
# Passwords
Your PostgreSQL database is the core of your Supabase project, so it's important that it has a strong, secure password at all times.
If you use special symbols in your postgres password, you must remember to [percent-encode](https://en.wikipedia.org/wiki/Percent-encoding) your password later if using the postgres connection string e.g. `postgresql://postgres:p%3Dword@db.cvwawazfelidkloqmbma.supabase.co:5432/postgres`
### 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 using SQL:
<Tabs defaultActiveId="SQL">
<TabPanel id="SQL" label="SQL">
```sql
alter user postgres
with password 'new_password';
```
</TabPanel>
</Tabs>
## Creating a secure password
It's absolutely critical that you store your customers' data safely. Here are some tips for creating a secure password.
- Use a password manager to generate it.
- Make a long password (12 characters at least).
- Don't use any common dictionary words.
- Use both upper and lower case characters, numbers, and special symbols.
## Resources
- [PostgreSQL `ALTER USER` Documentation](https://www.postgresql.org/docs/12/sql-alteruser.html)