473,396 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Postgresql database connection error...

Hi,

I installed and configured postgresql-8.2.5, and server is also running fine in command line as well as in graphical mode (pgadmin3).
I wrote a c-program to connect to the database of this postgresql server, compilation and linking done successfully. But when I tried to execute I am getting this problem.

Connection to database failed.
FATAL: role "madhu" does not exist

here "madhu" is the username of my system. I add "all' in the .conf files but still I am getting the same problem. please any one help me where I have to include this username.

Thanks & Regards.
Oct 20 '07 #1
1 3755
rski
700 Expert 512MB
Hi,

I installed and configured postgresql-8.2.5, and server is also running fine in command line as well as in graphical mode (pgadmin3).
I wrote a c-program to connect to the database of this postgresql server, compilation and linking done successfully. But when I tried to execute I am getting this problem.

Connection to database failed.
FATAL: role "madhu" does not exist

here "madhu" is the username of my system. I add "all' in the .conf files but still I am getting the same problem. please any one help me where I have to include this username.

Thanks & Regards.
madhu must be a databse user (system user it is not equal to databse user). Just create user using command createuser madhu
Oct 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bill J. | last post by:
I have to update a PostgreSQL linked server through MSSQL2K. I first configured the connection with ODBC as follows and I can do queries with no problem: EXEC sp_droplinkedsrvlogin @rmtsrvname...
0
by: Bill J. | last post by:
I have to update a PostgreSQL linked server through MSSQL2K. I first configured the connection with ODBC as follows and I can do queries with no problem: EXEC sp_droplinkedsrvlogin @rmtsrvname...
13
by: Zlatko Matić | last post by:
Is it possible to use Access as front-end for POstgreSQL and how ? What about Access Projects (.adp) and PostgreSQL ?
20
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are...
19
by: Alex Madon | last post by:
Hello, I am testing a web application (using the DBX PHP function to call a Postgresql backend). I have 375Mb RAM on my test home box. I ran ab (apache benchmark) to test the behaviour of the...
1
by: phil campaigne | last post by:
On Mon, 1 Mar 2004, phil campaigne wrote: >> Nigel J. Andrews wrote: >> > > >>> >On Mon, 1 Mar 2004, Phil Campaigne wrote: >>> > >>> >
1
by: Robert Morgan | last post by:
|I'm trying to run a query on a database using php and postgres functions ||<?php db_connect(); $stat = pg_exec($connstr,"SELECT WSID from tblWorkstation "); while ($row = pg_fetch_rows($stat))...
0
by: vicky | last post by:
Hello Experts, Trying to run sample Postgrel's ECPG(Embedded SQL)programs on RHL 9.0. Im unable to connect to PostgreSQL database (sirishadb) when I run the program .... # su postgres...
1
by: gocraig | last post by:
PG Admin Version 1.6.0 (Nov 15 2006, rev 5641) Running on Windows 2000 PostgreSQL 8.2.6, running remotely on Linux pg_hba.conf contains the record ... host all all ...
1
by: nampet | last post by:
We set up a new system with the OS and database below. Now some pages are not loading in browser. the error is: but the same code is no problem with old server.. i can also insert the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.