Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgAdmin not retaining server connections

I'm using pgAdmin III 1.18.1 on Ubuntu 12.04. Whenever I reboot my machine, pgAdmin does not remember my server connections. If I enter the server connections and then close pgadmin3 and reopen, the server connections are retained, it is only when I reboot my machine that the connections are lost.

After I create my server connections and close pgAdmin I see that the .pgadmin3 file is created just fine:

benc@Ubuntu-T7400:~$ ls -al | grep .pgadmin3
-rw-rw-r--   1 benc benc  2088 Mar 28 11:57 .pgadmin3

Restarting pgadmin3 will then display my server connections. But if I reboot my machine, my .pgadmin3 file is set to 0 bytes.

After a reboot of Ubtuntu:

benc@Ubuntu-T7400:~$ ls -al | grep .pgadmin3
-rw-rw-r--   1 benc benc     0 Mar 28 12:10 .pgadmin3

Any idea what might be going on here?

like image 420
Ben Carlson Avatar asked Mar 28 '14 16:03

Ben Carlson


People also ask

Why is pgAdmin not connecting to server?

If pgAdmin displays this message, there are two possible reasons for this: the database server isn't running - simply start it. the server isn't configured to accept TCP/IP requests on the address shown.

Does pgAdmin use SSL?

If pgAdmin is installed in Server mode (the default mode), you can use the platform-specific File manager dialog to upload files that support SSL encryption to the server.

Can't connect to server connection refused Postgres?

“Could not connect to server: Connection refused” To be sure that PostgreSQL is running, you can also restart it with systemctl restart postgresql. If this does not fix the problem, the most likely cause of this error is that PostgreSQL is not configured to allow TCP/IP connections.


1 Answers

I also gone through the same issue. But I have fixed this issue by following.

  1. Actually .pgadmin3 file is missing from my home folder. So, I created it manually.

    vish@Ubuntu:~$ ls -al | grep .pgadmin3
    -rw-rw-r--  1 vish vish          0 Jul 31 13:01 .pgadmin3
    
  2. By default user will not have access to execute that file. So I gave full access rights on this file.

     vish@Ubuntu:~$ sudo chmod a+wx .pgadmin3
    

    So now it will look like:

    -rwxrwxrwx  1 vish vish          0 Jul 31 13:01 .pgadmin3
    

Now every thing is working good.

like image 60
vissu Avatar answered Oct 19 '22 22:10

vissu