Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Master (#244)
Browse files Browse the repository at this point in the history
* Added postgres instructions (#224)
* Fixed example (#225)
  • Loading branch information
Landrash committed Mar 17, 2019
1 parent 9d525c5 commit 604309e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docs/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ If so, add a PR here when you are done:

Example of how to create the database:

```sql
sudo mysql -u root -p
CREATE DATABASE homeassistant;
CREATE USER 'homeassistantuser' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON homeassistant.* TO 'homeassistantuser';
FLUSH PRIVILEGES;
exit
```bash
sudo -s -u postgres
createuser homeassistant
createdb -O homeassistant homeassistant
```

Example configuration
```yaml
recorder:
db_url: postgresql://@/homeassistant #Connects to Postgresql via Unix socket, allowed by default
```
***
Expand Down

0 comments on commit 604309e

Please sign in to comment.