I'm trying to create a new database through the OSgeo4W shell, as opposed to loading QGIS and hitting the 'Manage DB' menu to make one an pipe in SQL scripts. I haven't seen any documentation on this specific issue.

I've tried piping in psql commands with the -p , -U and createdb commands to login and attempt to make a new database. I haven't had any success so far. I've mainly gotten connection refused messages, even though I type in the login information.

I'm not sure what the issue is here, or what I may be forgetting to do.

Shown are a couple attempts:

enter image description here

  • Works for me with psql -h localhost -p 5432 -U postgres databasename. I get the same error than you if I stop the database service. – user30184 Dec 11 '20 at 6:42
  • 1
    Did you ever install and run the PostgreSQL database service? Service and user management is different in Linux in Windows. – CL. Dec 11 '20 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.