3

I have load a *.sql file using psql. I'm working in Linux server. I use -w, so that it doesn't prompt for a password because at the end my program is meant to be automatic. But the I come across this message when I'm running it:

psql fe_sendauth no password supplied

How can I supply a password? As I told I'm working on the server side and don't have access to installation folder.

Daniel Vérité
  • 58,074
  • 15
  • 129
  • 156
f.ashouri
  • 5,409
  • 13
  • 44
  • 52

1 Answers1

1

It does not matter if you specify -w or not - if the server is configured to prevent anonymous access it will do. You must provide the password or alternatively the server may be configured to trust your IP address or the like.

The task of running PostgreSQL scripts without password prompts is discussed in Postgresql: Scripting psql execution with password.

Community
  • 1
  • 1
Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93