Bug #5133

Dbo tutorial

Added by Marko Taht over 6 years ago. Updated over 6 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


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= port=5432 dbname=Maalid connect_timeout=0");

dbo::Session session;



Updated by Koen Deforche over 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= port=5432'



Updated by Marko Taht over 6 years ago

OK i got it fixed. Problem was i needed separate DB server :D. But from tutorial i understood that WT has everything. So maybe mention it somewhere.

Also available in: Atom PDF