Elgirhath
Elgirhath

Reputation: 449

How do I create postgre SQL database locally with DataGrip

I'm getting started with Data Grip and I'm stuck before I started doing anything. First thing I've done was creating postgre Data Source with default parameters.

Properties

Now I opened a console, and tried to run a script:

drop table table1;

The console then prints:

Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

Properties

What can I do about that, so that I could create my project in e.g.: D:\Database\ instead of connecting to other hosts?

Upvotes: 2

Views: 6929

Answers (1)

Chris Thompson
Chris Thompson

Reputation: 35598

Sounds like you're not actually running PostgreSQL locally. Is it installed and running? PostgreSQL is a client/server-based database system, so it requires the server process to be running. This is not like SQLite or HSQLDB that run self-contained within your application (or DataGrip in this case). Please see here for a tutorial on how to get started with Postgres on a Mac. There are similar tutorials for other operating systems.

Upvotes: 5

Related Questions