Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to database through JDBC in pgAdmin?

I have database connection settings and pgAdmin (it is all that i have). Can I connect to the database through the pgAdmin to make the necessary changes in the database using these settings? If so, how?

I have not found how I can do this. Other answers here (and in google too) suggest writing Java-code - this is not what i need. I want to use pgAdmin interface for it. Can I make changes without using Java-code?

Here example of settings that i have:

jdbc.driverClassName - org.postgresql.Driver
jdbc.url - jdbc:postgresql://localhost:4444/
jdbc.username - username
jdbc.password - password
like image 871
lleviy Avatar asked Sep 02 '25 06:09

lleviy


1 Answers

I don't understand why people don't understand what he's trying to do. He just wants to connect to db using pgAdmin. He just doesn't understand how to use the connection string in pgAdmin.

Basically, just remove all prefixes and suffixes (eg. jdbc:postgresql://). So your hostname is localhost. Type localhost in host name, 4444 in port name as well as your username and password. Also give it a name in General tab Then you'll see the databases on the left. Click Tools > Query Tool and write your select/insert etc. scripts.

enter image description here

like image 181
Cüneyt Aliustaoğlu Avatar answered Sep 05 '25 01:09

Cüneyt Aliustaoğlu