pgAdmin - Sharing DB Connection Definitions

眉间皱痕 提交于 2019-12-18 19:40:07

问题


I have a few database servers and few developers.
I have set up database connection definitions on my PC for each servers and now I want to share with other developers but I was not sure how to export and import the definitions.

I am running pgAdmin 1.10.2 on Ubuntu 10.04 (lucid).


回答1:


You should have a .pgadmin3 conf file in your home directory. You just need to give that one to your fellow developers.




回答2:


By the way, for those looking for the answer to this question on the Windows platform, the server definitions are stored in the Windows registry at HKEY_CURRENT_USER\Software\pgAdmin III\Servers

You can export this key to a .reg file and share it. However, due to the naming of the keys, it will likely overwrite any existing keys in the target registry.




回答3:


On Original Computer

Export the server definitions found in Windows registry found here:

Windows Key > regedit

HKEY_CURRENT_USER\Software\pgAdmin III\Servers

Right Click on Servers Folder and click Export

Leave the default radio button 'Selected Branch' the way it is. This will be how it knows where to insert it when you want to import it.

Choose a name for your file (e.g. pgadminServers) and click Save

This is the file you will use to import to another computer (which ideally has the same version of pgAdmin)

On New Computer

Make sure pgadmin is not currently open

Windows Key > regedit

File > Import > Choose your pgadminServers.reg file.

Click Ok to the alert that says 'The keys and values contained in //filepath have been successfully added to the registry.'

Close or exit the registry editor

Launch pgAdmin




回答4:


Not enough reputation, else I would add a comment to @ojhurst

IF you leave your pgAdmin III open or have already added a server and then import the pgadminServers.reg file

Edit that file (or modify entry in registry) the following entry

[HKEY_USERS\S-1-5-21-....-1140347\Software\pgAdmin III\Servers] "Count"=dword:0000001

to the total count of servers (e.g. 53)

[HKEY_USERS\S-1-5-21-....-1140347\Software\pgAdmin III\Servers] "Count"=dword:0000053




回答5:


PgAdmin 4 stores the server connection details in an SQLite3 file.

In Windows this file is located at:

%APPDATA%\pgAdmin\pgadmin4.db

In Linux it lives at:

/var/lib/pgadmin4/pgadmin4.db

You can configure a custom location by editing config_local.py file.



来源:https://stackoverflow.com/questions/3464396/pgadmin-sharing-db-connection-definitions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!