title: How to set up localhost server and database for PostgreSQL?
body: <p>I am new to PostgreSQL, and I want to use it on my personal laptop for personal projects. I use SQL Server and SQL Server Management Studio at work, coding-wise I'm ok but I need some help with setting up the localhost on my laptop.</p>
  
  <p>So I downloaded PostgreSQL and installed it along with pgAdmin that came with the package. </p>
  
  <p>During installation, it asked me to create a PostgreSQL superuser password, which I did. </p>
  
  <p>Then I tried creating a new server using pgAdmin as follows:</p>
  
  <p>General Tab:</p>
  
  <blockquote>
    <p>Name: localhost<br>
    Server Group: Servers<br>
    Connect Now?: check</p>
  </blockquote>
  
  <p>Connection Tab:</p>
  
  <blockquote>
    <p>Host name/address: localhost   Port: 5432</p>
    
    <p>Maintenance database: postgres </p>
    
    <p>Username: postgres </p>
    
    <p>Password: [blank]</p>
  </blockquote>
  
  <p>But when I click save I'm getting an error message:</p>
  
  <blockquote>
    <p>Unable to connect to server: could not connect to server: Connection
    refused (0x0000274D/10061) Is the server running on host
    "localhost"(::1) and accepting TCP/IP connections on port 5432? could
    not connect to server: Connection refused (0x0000274D/10061) Is the
    server running on host "localhost"(127.0.0.1) and accepting TCP/IP
    connections on port 5432?</p>
  </blockquote>
  
  <p>Also tried replacing the password field with the Superuser password, getting the same error message.</p>
  
  <p>Would greatly appreciate it if anyone offers any insights into this problem, I might just be a noob when it comes to server setups...</p>
  
  <p>Thanks,
  Mike</p>
  
  <p>Update:
  I believe there's a service I need to start as suggested by @Scott Moniz. I went into services.msc, tried to start the service <strong>postgresql-x64-10 - PostgreSQL Servier 10</strong>, and I got this error message:</p>
  
  <blockquote>
    <p>"The postgresql-x64-10 - PostgreSQL Server 10 service on Local
    Computer started and then stopped. Some services stop automatically if
    they are not in use by other services or programs".</p>
  </blockquote>
  
  <p>I then tried editing the property of the service, by changing the <strong>Log on as</strong> option to <strong>Local System Account</strong> and tried starting the service again, still got the same error message.</p>
  
  <p>I'm using Windows 10 Home edition, it this helps to resolve the issues in anyway</p>
  
  <p>Thanks,
  Mike</p>