To make sure our PostgreSQL is secured with a strong password, set a password for its system user and then change the default database admin user account
Change user password
```yaml
passwd postgres
```
Login using Postgres system account
```
su - postgres
```
Now, change the Admin database password
```
psql -c "ALTER USER postgres WITH PASSWORD 'your-password';"
```
Create a new user.
```yaml
psql
```
```yaml
CREATE USER admin WITH PASSWORD 'your-password';
```
Create a new database:
```yaml
CREATE DATABASE homeassistant;
```
Grant all rights or privileges on created database to the user
```yaml
GRANT ALL ON DATABASE homeassistant TO admin;
```
To exit psql
```yaml
\q
```
Then type exit to get back to root
Change the recorder: `db_url:` in your HA configuration.yaml
⚙️ [**Adminer**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/adminer.png) (formerly phpMinAdmin) is a full-featured database management tool