Postgresql Django settings

115 views
Skip to first unread message

Kush Goyal

unread,
Mar 22, 2017, 9:57:56 AM3/22/17
to Google Cloud SQL discuss
I am not able to connect to postgres db from app engine flexi environment.

These are the settings I am using:

in django settings file:

DATABASES = {
    'default': {
            'ENGINE': 'django.db.backends.postgresql',
            'NAME': '<db-name>',
            'USER': '<user-name>',
            'PASSWORD': '<password>',
            'HOST': '/cloudsql/<instanse-connection-name>',
            'PORT': '5432'
        },
}

in app.yaml:

beta_settings:
    cloud_sql_instances: <instanse-connection-name>

The error I am getting is this:

could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/cloudsql/<instanse-connection-name>/.s.PGSQL.5432"?

Please help.

Kush Goyal

unread,
Mar 25, 2017, 5:10:13 AM3/25/17
to Google Cloud SQL discuss
Reply all
Reply to author
Forward
0 new messages