PDA

View Full Version : Fix for PostgreSQL cannot start error 127.0.0.1



morny
03-12-2009, 02:59 PM
If youve just recently had a problem where it says Failed to establish a connection to ‘127.0.0.1’ then its most likely due to an update microsoft released for defender. Please try the following to fix it

1: Go to "C:\Windows\system32\drivers\etc" and open the "hosts" file with
notepad

It might look something like this:


**************************************************
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

::1 localhost
************************************************** ****

2: Enter "127.0.0.1 localhost" (without the quotes) at the bottom of the
file, so it looks like this:


**************************************************
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
::1 localhost
************************************************** ****



3: If your host file has hundreds of lines (created by SpybotSearch&Destroy, remove all those lines!)
4: Save the file
5: Reboot your PC