How to connect PGAdmin3 to Cloud66 hosted Postgres - postgresql

I have a Cloud66 hosted web app and Postgres database (on a dedicated server)
I'd like to connect to the Postgres DB via PGAdmin3 but I have been unable to configure Postgres to accept my connection.
I have added the following line to pg_hba.conf
host all all 86.161.230.162/32 md5
I have checked that postgresql.conf has the following setting:
listen_addresses = '*'
Any ideas?
The doubt in my mind is - Am I editing the correct version of these files? They took me a while to find and now I'm wondering if maybe there not the correct versions. These files are located in the directory
./usr/local/pgsql/data/
Advice/guidance all appreciated.

School boy error.
Of course. Firewall!
Doh.

Related

Postgres Remote Access

My teammate can't access to my Database on PgAdmin. I have connected the database on IntelliJ.
That's what i see:
That's what my teammate see:
Under postgres>schemas>public
He can only see Student table.
On the file postgresql.conf I already have replaced the line listen_addresses = 'localhost' with listen_addresses= '*'
And on the file pg_hba.conf that's the situation:
Why he cant see all the tables? How can we fix it?
We need that from his pc he can access to my database.
Thanks for help and orry for bad english.

How to connect Odoo with postgres (which is running on other server)

I want to connect odoo 10 with the postgresql (which is running on other server). Is it possible ? If, yes! then please do help me out by posting step by step procedure or any sort of tutorial link (because I'm beginner). For now, I'm using odoo10 and postgresql-9.6 For different servers I'm using two different virtual machines (one is for odoo & other is for postgresql)
Here, I'm using two virtual machines 216.200.116.8 (for odoo) & 216.200.116.174 (for postgresql). I'm able to access postgresql from 216.200.116.8 remotely.
Here is my /etc/odoo.conf
Here is my /etc/postgresql/9.6/main/postgresql.conf
Here is my /etc/postgresql/9.6/main/pg_hba.conf
After everything is configured I'm running odoo server from /opt/odoo/odoo10.0/odoo-bin
I've encountered this error! The detailed error says:
Odoo ver : 10 & postgresql ver : 9.6
Database User :postgres
password for postgres: passwd
Help needed! Thanks in Advance
If I am not mistaken, you must change the user in the database, odoo doesn't allow "postgres" as the user, you must create an "odoo user" to connect the application to the database like this:
db_user: odoo
db_password: yourpassword
Then in the postgres.conf file you must change this line:
listen_adresses = 'localhost'
I can't remember if something must be changed in the .hba
You need to change in pg_hba.conf file
In IPV4 section , you need to replace 1 line with below change.
host all all 0.0.0.0/0 trust
This is for first line in IPV4 section.
After Restart PostgreSQL , you can connect.

Couldn't drop staging_database : #<PG::ConnectionBad: FATAL: no pg_hba.conf

For a system that I am using, I run into the problem pasted on the title when I try to drop a database and recreate it. More specifically, this is the exact problem that I am facing:
Couldn't drop staging_databse : #<PG::ConnectionBad: FATAL: no pg_hba.conf entry for host xxx.xx.xxxx.xxx, user "ruby", database "postgres", SSL off
I've done some research regarding this problem and it seems that the solution is simply to turn on SSL. I've consulted Postgresql Documentation on pg_hba.conf but I'm unable to find this configuration file.
I typed in locate postgresql and I noticed that there is a postgresql-client-9.2 installed on the system. From what I have determined, I won't find this pg_hba.conf file because the client doesn't have it. I've also looked for the postgresql.conf file on SSL according to the official documentation but this file is not included either.
Finally, the documentation shows me this configuration option of the pgsql 9.2 client shown below:
libpq reads the system-wide OpenSSL configuration file. By default,
this file is named openssl.cnf and is located in the directory reported by
openssl version -d. This default can be overridden by setting environment
variable OPENSSL_CONF to the name of the desired configuration file.
However, this too isn't in my system. I've run the linux find command and this file doesn't seem to be there. I've run out of leagues and I have a sneaking suspicion that I am overlooking something very simple. Is there any other leads I can go on? Thanks.
Based on this message and the rest of the context:
FATAL: no pg_hba.conf entry for host xxx.xx.xxxx.xxx, user "ruby", database "postgres", SSL off
It looks plausible that:
you're connecting to a remote PostgreSQL instance which you don't administrate because you're acting as developer, not admin.
the db management layer tries to connect to the database named postgres in order to drop another database (staging_database) . It's necessary indeed because we can't drop a database when we're connected to it (in fact, a database can't be dropped when anyone is connected to it).
the admin policy established by the remote pg_hba.conf is such that your login and IP address together are not allowed to connect to the database named postgres
These facts combined together imply that you're missing the necessary rights to drop your database, even if indirectly.
At this point you want to submit the problem to the admin responsible for that PostgreSQL server.

Remote Database Connection Setup in Netbeans

I'm totally junior in this area :)
I have JAVA version 7 on my PC.
I want to connect my PostgreSQL database to NetBeans.
Based on my search I found that I should get JDBC driver. so I downloaded JDBC41 Postgresql Driver, Version 9.3-1100 jar files from here.
then based on what I found for connection remote Mysql, did similar changes to connect to my PostgreSQL database.
As you can see in the image, connection couldn't established.
Based on what my host says, I added my IP address to "Remote PostgreSQL Database Access" page of my host.
I'm not sure my host name is correct. I used Dedicated IP Address of my site.
Any suggestion would be appreciated. Thanks
My fault was entering wrong user name and pass instead of using user name and password of database :(

setup-database-server-with-postgresql-and-pgadmin3

We have set up postgres 9.0 on our new debian 6.0 server
We want to remotely connect to this database server.
We followed the steps in the below url
http://www.ubuntugeek.com/howto-setup-database-server-with-postgresql-and-pgadmin3.html
But when restart our database it thows the foloowing error
authentication option not in name=value format: sameuser
Any advice on how to access database server remotely using pgadmin 3 would be much appreciated
According to this link, there was changed format of configuration file pg_hba.conf. Remove, please, keyword sameuser from it.