472,790 Members | 3,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,790 software developers and data experts.

error connecting to database

Im trying to connect locally to a database on a running postgres
cluster. If i connect with psql, everything is fine and i can transact.
I i try and connect in my own app, i get this error:

Could not connect to server: permission denied.
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"

I know for a fact postgres is running, i can see with <ps> and also
<top> in the terminal on Mac OSX 10.3.5.

What exctly does this error message mean? What permissions is this
error talking about?

Alex
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
6 3441
* Alexander Cohen <al**@toomuchspace.com> [2004-10-01 14:42:07 -0400]:
Im trying to connect locally to a database on a running postgres
cluster. If i connect with psql, everything is fine and i can transact.
I i try and connect in my own app, i get this error:

Could not connect to server: permission denied.
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"

I know for a fact postgres is running, i can see with <ps> and also
<top> in the terminal on Mac OSX 10.3.5.
Try 'netstat -ntpl' intead to see if it's listening.
What exctly does this error message mean? What permissions is this
error talking about?


That typically means that you're connecting via the local unix socket
instead of the tcp port. If your application is trying to do the
latter you'll want to uncomment the tcp_socket setting in
postgresql.conf and restart.

--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2
Alexander Cohen <al**@toomuchspace.com> writes:
Could not connect to server: permission denied.
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432" What exctly does this error message mean? What permissions is this
error talking about?


The permissions on the socket file /tmp/.s.PGSQL.5432.

Ordinarily the postmaster will create the socket as world-writable,
but evidently not this time. Perhaps you have set a nonstandard value
for "unix_socket_permissions"? Another possibility is that it's not
the socket file itself, but /tmp that is mis-permissioned.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #3

On 1-Oct-04, at 3:06 PM, Tom Lane wrote:
Alexander Cohen <al**@toomuchspace.com> writes:
Could not connect to server: permission denied.
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"

What exctly does this error message mean? What permissions is this
error talking about?


The permissions on the socket file /tmp/.s.PGSQL.5432.

Ordinarily the postmaster will create the socket as world-writable,
but evidently not this time. Perhaps you have set a nonstandard value
for "unix_socket_permissions"? Another possibility is that it's not
the socket file itself, but /tmp that is mis-permissioned.


What kind of permissions does /tmp need?

Alex
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #4
Alexander Cohen <al**@toomuchspace.com> writes:
What kind of permissions does /tmp need?


Generally it's 777 (ie, wide open), plus stickybit if your system
supports that (so people can't delete each others' temp files).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #5
Hi All,

I want to connect to PostgreSQL 7.4 from my Windows machine. What ODBC
version is needed? Is there any other important settings required? I am very
new to this database.

Thanks,
Astha
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #6
Astha Raj wrote:
Hi All,

I want to connect to PostgreSQL 7.4 from my Windows machine. What ODBC
version is needed? Is there any other important settings required? I am very
new to this database.


Search on google: "odbc postgresql" and I'm feeling lucky.


Regards
Gaetano Mendola

Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jasper Recto | last post by:
I have a little program that opens a progress database and runs a report. Dim Path As Object Dim Report As Object Path = "d:\ReportBuilder\VendorShipping.p" Report =...
3
by: GTDriver | last post by:
I'm trying to connect my application with a web service located on my own web server(localhost). I guess when the solution/proect is built it makes a file called 'Web...
5
by: Clodoaldo Pinto Neto | last post by:
I suspect there is something wrong because it takes 73s to delete a single line from a table whith 140 lines. So I tried to reindex the database: bash-2.05b$ postgres -P -O -D /var/lib/pgsql/data...
0
by: Mike Snetzko | last post by:
Hi All -- I have a website on an IIS 6.0 server and I am trying to update the settings via asp page and vbscript. Below is the code that is supposed to retrieve the Metapath, and it does,...
3
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to...
0
by: athindrans | last post by:
hi everyone first time using sql server. I have problem connecting from a small c++ program in visual c++ express editon to sqlserver 2005 developer editon. It says error connecting to...
1
by: jesmi | last post by:
my code is: U]employee.cfm <html> <head> <title>Employee List</title> </head> <body> <h1>Employee List</h1>
12
by: ewarts | last post by:
Hey Guys, I have an access database with a few tables and forms. I was trying to add a new combo box to one of my forms and to do so i needed to add the referenced data to my reference data table....
1
by: Akino877 | last post by:
Hello, I have a simple Perl program that connects to MySQL and creates a table of first names and last names. The code is as follows : #!/usr/bin/perl -w use DBI; use Mysql; use DBD::mysql;
0
by: nfnick | last post by:
HI!... I'm working in Visual Basic 2005 with PostgreSql via the oficial ODBC driver. When i try to insert a new row I get this error message: ERROR: cross-database references are not implemented...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.