Problem with PostgreSQL database connection

Asked By 10 points N/A Posted on -
qa-featured

Hello, On my Windows 7 machine, I run PostgreSQL databases, but I can't add a server to create my databases. As an address I use 'localhost'  but can't connect, resulting to the following errors:

pgAdmin III

An error has occurred:

Error connecting to the server: FATAL: database "db" does not exist

pgAdmin III

An error has occurred:

Error connecting to the server: could not connect to server: Connection refused (0x0000274D/10061)

Is the server running on host "127.0.0.1' and accepting

TCP/IP connections on port 5432?

Keep in mind that I have configured my firewall to accept connection on port 5432.
 

SHARE
Best Answer by Rodney2001
Best Answer
Best Answer
Answered By 0 points N/A #84026

Problem with PostgreSQL database connection

qa-featured

Ensure that your administrator creates a postgressSQL user account for you. This will largely solve the problem. Then try creating a pgadmin and a new login Role and name it (give it the user name you want to be using).  Give it permission graphically or from command line if you are the operating system's manager.

Create something that resembles this psql-U postgress- c then create a Role. Login nosuperuser inherit createdb createrole for more information about this you can go to https://www.postgresql.org/docs/devel/static/. This will enable you get accurate information about how to go about creating the database.

Answered By 0 points N/A #84028

Problem with PostgreSQL database connection

qa-featured

The first error window shows the non-existence of database ‘db’ from your PostgreSQL.

The means that PostgreSQL is trying to connect to the given database which has not been created.

Solution:

A database should be created with the specified name after logging in as Administrator to the machine. More information on database creation can be read at: https://www.postgresql.org/docs/8.1/static/tutorial-createdb.html

The Server connection problem could be arising from:

The server has not been started or 3rd party firewall software is installed in the machine.

Solution:

Try Uninstalling the software or disabling the firewall. If that doesn’t work out try restarting the server.

If the TCP/IP connections configurations errors persist. Follow this procedure.

Open the PostgreSQL configuration file (postgresql.conf) and enable the TCP/IP port by setting the (tcpip_socket = true).save and close the file and restart the server. More information can be read at: http://www.cyberciti.biz/faq/postgresql-remote-access-or-connection

Related Questions