Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs, sql-mode, Postgresql and inputing password

I'm trying to connect to a PostgreSQL DB thru Emacs using the sql-mode. I start Emacs, command M-x sql-postgres and it prompts for User, Database and Server but not for the password. An empty buffer opens and whatever I write, I get:

the Password for user james:
psql: FATAL:  password authentication failed for user "james"

I can login using psql, though. I'm running GNU Emacs 24.4.1 in Linux Antergos, PostgreSQL is 9.3.5.

Thanks..

like image 827
James Brown Avatar asked Oct 31 '14 15:10

James Brown


1 Answers

In case someone else comes looking I solved this by calling send-invisible and typing in my password, after the sql-postgres command completed. Emacs version 24.5.1.

  1. Initiate postgres connection
  2. At blank screen M-x send-invisible
  3. Type password.
  4. Profit.
like image 186
Kevin Avatar answered Sep 18 '22 09:09

Kevin