Thinkful-Ed / node-sql-sequelize-lessons

Extension work on SQL and Sequelize for Thinkful's Node course
https://courses.thinkful.com/node-sql-001v1/unit/1
1 stars 4 forks source link

Windows Postgress Issues #9

Open cklanac opened 7 years ago

cklanac commented 7 years ago

Summary: 1) The new installer appears to automatically setup and run postgres as service 2) Stopping service and running from command line prompts firewall settings 3) Running createuser -U postgres -Pw --interactive does not respond 4) Running createdb dev -U dev or createdb -U dev dev does not respond

1) Running pg_ctl start responds with this:

IEUser@MSEDGEWIN10 MINGW64 ~
$ pg_ctl start
pg_ctl: another server might be running; trying to start server anyway
server starting

IEUser@MSEDGEWIN10 MINGW64 ~
$ 2017-05-30 04:27:21 PDT LOG:  could not bind IPv6 socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.

2017-05-30 04:27:21 PDT HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2017-05-30 04:27:21 PDT LOG:  could not bind IPv4 socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.

2017-05-30 04:27:21 PDT HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2017-05-30 04:27:21 PDT WARNING:  could not create listen socket for "*"
2017-05-30 04:27:21 PDT FATAL:  could not create any TCP/IP sockets
2017-05-30 04:27:21 PDT LOG:  database system is shut down

image

2) After stopping the service above, and running pg_ctl start image

3) Bash command createuser -U postgres -Pw --interactive does not respond. But logging in with psql -U postgres and entering the password at the prompt does work. So create the user using the CREATE USER command

CREATE ROLE dev WITH LOGIN PASSWORD 'Password1' SUPERUSER;

4) Running createdb dev -U dev or createdb -U dev dev does not respond so use CREATE DATABASE command instead:

CREATE DATABASE dev WITH OWNER dev;