PostgreSQL Connection URL
How is the PostgreSQL connection URL formed, when the host is some other computer than the localhost?
I have allowed PostgreSQL to accept requests from outside.
postgresql database-connection
add a comment |
How is the PostgreSQL connection URL formed, when the host is some other computer than the localhost?
I have allowed PostgreSQL to accept requests from outside.
postgresql database-connection
Drivers? Language?
– Milen A. Radev
Aug 27 '10 at 10:30
add a comment |
How is the PostgreSQL connection URL formed, when the host is some other computer than the localhost?
I have allowed PostgreSQL to accept requests from outside.
postgresql database-connection
How is the PostgreSQL connection URL formed, when the host is some other computer than the localhost?
I have allowed PostgreSQL to accept requests from outside.
postgresql database-connection
postgresql database-connection
edited Jul 23 '18 at 13:28
Arturo Herrero
8,66363267
8,66363267
asked Aug 27 '10 at 8:43
JIIJII
544269
544269
Drivers? Language?
– Milen A. Radev
Aug 27 '10 at 10:30
add a comment |
Drivers? Language?
– Milen A. Radev
Aug 27 '10 at 10:30
Drivers? Language?
– Milen A. Radev
Aug 27 '10 at 10:30
Drivers? Language?
– Milen A. Radev
Aug 27 '10 at 10:30
add a comment |
5 Answers
5
active
oldest
votes
If you use Libpq binding for respective language, according to its documentation URI is formed as follows:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
Here are examples from same document
postgresql://
postgresql://localhost
postgresql://localhost:5432
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
postgresql://localhost/mydb?user=other&password=secret
10
This workded for me postgres://user:secret@localhost:5432/mydatabasename
– George Livingston
Feb 16 '18 at 15:04
postgresql://localhost/mydb?user=other&password=secret
did the trick
– Karuhanga
Oct 29 '18 at 14:31
add a comment |
Here is the documentation for JDBC, the general URL is "jdbc:postgresql://host:port/database"
Chapter 3 here documents the ADO.NET connection string,
the general connection string is Server=host;Port=5432;User Id=username;Password=secret;Database=databasename;
PHP documentation us here, the general connection string is
host=hostname port=5432 dbname=databasename user=username password=secret
If you're using something else, you'll have to tell us.
add a comment |
The following worked for me
var conString = "postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase";
add a comment |
the connection url for postgres
syntax:
"Server=host ipaddress;Port=5432;Database=dbname;User Id=userid;Password=password;
example:
"Server=192.168.1.163;Port=5432;Database=postgres;User Id=postgres;Password=root;
add a comment |
host or hostname would be the i.p address of the remote server, or if you can access it over the network by computer name, that should work to.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f3582552%2fpostgresql-connection-url%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you use Libpq binding for respective language, according to its documentation URI is formed as follows:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
Here are examples from same document
postgresql://
postgresql://localhost
postgresql://localhost:5432
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
postgresql://localhost/mydb?user=other&password=secret
10
This workded for me postgres://user:secret@localhost:5432/mydatabasename
– George Livingston
Feb 16 '18 at 15:04
postgresql://localhost/mydb?user=other&password=secret
did the trick
– Karuhanga
Oct 29 '18 at 14:31
add a comment |
If you use Libpq binding for respective language, according to its documentation URI is formed as follows:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
Here are examples from same document
postgresql://
postgresql://localhost
postgresql://localhost:5432
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
postgresql://localhost/mydb?user=other&password=secret
10
This workded for me postgres://user:secret@localhost:5432/mydatabasename
– George Livingston
Feb 16 '18 at 15:04
postgresql://localhost/mydb?user=other&password=secret
did the trick
– Karuhanga
Oct 29 '18 at 14:31
add a comment |
If you use Libpq binding for respective language, according to its documentation URI is formed as follows:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
Here are examples from same document
postgresql://
postgresql://localhost
postgresql://localhost:5432
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
postgresql://localhost/mydb?user=other&password=secret
If you use Libpq binding for respective language, according to its documentation URI is formed as follows:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
Here are examples from same document
postgresql://
postgresql://localhost
postgresql://localhost:5432
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
postgresql://localhost/mydb?user=other&password=secret
edited Apr 16 '18 at 17:05
Mike 'Pomax' Kamermans
27.5k65797
27.5k65797
answered Dec 21 '13 at 18:37
AndreyAndrey
2,331186
2,331186
10
This workded for me postgres://user:secret@localhost:5432/mydatabasename
– George Livingston
Feb 16 '18 at 15:04
postgresql://localhost/mydb?user=other&password=secret
did the trick
– Karuhanga
Oct 29 '18 at 14:31
add a comment |
10
This workded for me postgres://user:secret@localhost:5432/mydatabasename
– George Livingston
Feb 16 '18 at 15:04
postgresql://localhost/mydb?user=other&password=secret
did the trick
– Karuhanga
Oct 29 '18 at 14:31
10
10
This workded for me postgres://user:secret@localhost:5432/mydatabasename
– George Livingston
Feb 16 '18 at 15:04
This workded for me postgres://user:secret@localhost:5432/mydatabasename
– George Livingston
Feb 16 '18 at 15:04
postgresql://localhost/mydb?user=other&password=secret
did the trick– Karuhanga
Oct 29 '18 at 14:31
postgresql://localhost/mydb?user=other&password=secret
did the trick– Karuhanga
Oct 29 '18 at 14:31
add a comment |
Here is the documentation for JDBC, the general URL is "jdbc:postgresql://host:port/database"
Chapter 3 here documents the ADO.NET connection string,
the general connection string is Server=host;Port=5432;User Id=username;Password=secret;Database=databasename;
PHP documentation us here, the general connection string is
host=hostname port=5432 dbname=databasename user=username password=secret
If you're using something else, you'll have to tell us.
add a comment |
Here is the documentation for JDBC, the general URL is "jdbc:postgresql://host:port/database"
Chapter 3 here documents the ADO.NET connection string,
the general connection string is Server=host;Port=5432;User Id=username;Password=secret;Database=databasename;
PHP documentation us here, the general connection string is
host=hostname port=5432 dbname=databasename user=username password=secret
If you're using something else, you'll have to tell us.
add a comment |
Here is the documentation for JDBC, the general URL is "jdbc:postgresql://host:port/database"
Chapter 3 here documents the ADO.NET connection string,
the general connection string is Server=host;Port=5432;User Id=username;Password=secret;Database=databasename;
PHP documentation us here, the general connection string is
host=hostname port=5432 dbname=databasename user=username password=secret
If you're using something else, you'll have to tell us.
Here is the documentation for JDBC, the general URL is "jdbc:postgresql://host:port/database"
Chapter 3 here documents the ADO.NET connection string,
the general connection string is Server=host;Port=5432;User Id=username;Password=secret;Database=databasename;
PHP documentation us here, the general connection string is
host=hostname port=5432 dbname=databasename user=username password=secret
If you're using something else, you'll have to tell us.
answered Aug 27 '10 at 8:53
nosnos
175k43317426
175k43317426
add a comment |
add a comment |
The following worked for me
var conString = "postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase";
add a comment |
The following worked for me
var conString = "postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase";
add a comment |
The following worked for me
var conString = "postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase";
The following worked for me
var conString = "postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase";
answered Oct 9 '18 at 9:51
Hemadri DasariHemadri Dasari
7,66911339
7,66911339
add a comment |
add a comment |
the connection url for postgres
syntax:
"Server=host ipaddress;Port=5432;Database=dbname;User Id=userid;Password=password;
example:
"Server=192.168.1.163;Port=5432;Database=postgres;User Id=postgres;Password=root;
add a comment |
the connection url for postgres
syntax:
"Server=host ipaddress;Port=5432;Database=dbname;User Id=userid;Password=password;
example:
"Server=192.168.1.163;Port=5432;Database=postgres;User Id=postgres;Password=root;
add a comment |
the connection url for postgres
syntax:
"Server=host ipaddress;Port=5432;Database=dbname;User Id=userid;Password=password;
example:
"Server=192.168.1.163;Port=5432;Database=postgres;User Id=postgres;Password=root;
the connection url for postgres
syntax:
"Server=host ipaddress;Port=5432;Database=dbname;User Id=userid;Password=password;
example:
"Server=192.168.1.163;Port=5432;Database=postgres;User Id=postgres;Password=root;
answered Dec 1 '16 at 4:17
vinoth shankarvinoth shankar
19415
19415
add a comment |
add a comment |
host or hostname would be the i.p address of the remote server, or if you can access it over the network by computer name, that should work to.
add a comment |
host or hostname would be the i.p address of the remote server, or if you can access it over the network by computer name, that should work to.
add a comment |
host or hostname would be the i.p address of the remote server, or if you can access it over the network by computer name, that should work to.
host or hostname would be the i.p address of the remote server, or if you can access it over the network by computer name, that should work to.
answered Jun 13 '12 at 14:27
user1453137user1453137
391
391
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f3582552%2fpostgresql-connection-url%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Drivers? Language?
– Milen A. Radev
Aug 27 '10 at 10:30