Wt dbo tutorial should be updated. Im trying to run my Wt app with postgreSQL but since it seems to be lot harder to set up than mySQL, i cant get it working. Main question i have is: Do i have to create database before in some other program or manager? If not then how do i connect the Wt in such a way that it would work?
Im getting connection refused. They say i should use username and password, but since there currently is no database, i dont know where to add it or if i even need it.
This is how i set up session
@ dbo::backend::Postgres postgres("host=127.0.0.1 port=5432 dbname=Maalid connect_timeout=0");
Updated by Koen Deforche about 6 years ago
Postgres can be indeed frustrating to configure.
- Check if your postgres is indeed running by trying to connect first using 'psql'
- You need to first create a database using SQL (e.g. using psql) or using 'makedb'
- The postgres configuration out of the box differs for each distro.
- Connection refused probably means that your server isn't running, or isn't listening for TCP connections. That means you should be able to connect without 'host=127.0.0.1 port=5432'