database - ERROR: no PostgreSQL user name specified in startup packet -


i'm rocking phoenix app, , when try run mix ecto.migrate, encounter following error:

genserver #pid<0.181.0> terminating ** (postgrex.error) fatal (invalid_authorization_specification): no postgresql user name specified in startup packet     (db_connection) lib/db_connection/connection.ex:148: dbconnection.connection.connect/2     (connection) lib/connection.ex:622: connection.enter_connect/5     (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3 last message: nil state: postgrex.protocol 

there's q&a out there touches on particular error, haven't found them useful, unfortunately. turn here!

additional environment info: mac os x, postgres.app, pg version 9.5

the startupmessage sent client server must contain non-empty user name; the documentation says:

startupmessage (f)

[...]

the protocol version number followed 1 or more pairs of parameter name , value strings. 0 byte required terminator after last name/value pair. parameters can appear in order. user required, others optional. [...]

my guess specified empty user name.


Comments