3

I am running a Django project with PostgreSQL (postgresql_psycopg2) on a shared host (using fcgi). To clarify: I am currently not using SSL.

After deploying my project and running python manage.py syncdb on the command-line, I get the following error:

"OperationalError: received invalid response to SSL negotiation: 2" 

This is the message I see on every debug page whenever I try to connect to the DB.

Thanks!

2 Answers 2

6

Also make sure you're not using the port number for MySQL but the one for postgres. Maybe I'm the only one silly enough to do that...

Sign up to request clarification or add additional context in comments.

1 Comment

That makes two of us. The correct Postgres port to use is 5432
4

Must define the host to 'localhost'. That solved the issue.

1 Comment

Do you mean the hostname as in /etc/hostname?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.