By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,084 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,084 IT Pros & Developers. It's quick & easy.

Postgresql database connection error...

P: 17
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
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 700
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

Post your reply

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