humankindof
Getting [error] GenServer #PID<0.398.0> terminating ** (Postgrex.Error) FATAL 08P01 (protocol_violation) no such database
Hey,
If I am creating a new install and want to use a remote database from the start.
I have attempted to do several different ways Im not sure which to post as far as results.
Im looking for an order of operations.
Do I need to create the app with/wo database first.
if I should get the base app working first then migrate.
or change the credentials just after mix phx.new
etc
the end result would be to go straight to production with a ‘fullstackphoenix’ starter template app to fly.io with a managed database at digital ocean.
but even as far as just a blank fresh install, many, I’m not having success doing this configuration just yet.
I can get a blank install onto fly.io no issues but as soon as I introduce the external database to dev.ex and/or runtime.ex (local or deploy, usually same issue) I get:
05:27:10.307 [error] GenServer #PID<0.328.0> terminating
** (Postgrex.Error) FATAL 08P01 (protocol_violation) no such database: postgres
(db_connection 2.4.3) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
Any pointers would be appreciated.
Most Liked
D4no0
This seems more of a issue related to configuration. I would recommend using runtime configuration for deployments as it makes configurations easier.
As for migrations, they are pretty flexible and highly depend on your requirements. I’m not sure how fly.io deployments work, however if it creates a release for you, then you won’t have mix in your project anymore, so you have to create your own custom migrator you can find and example here.
benwilson512
Hi @humankindof this seems like a duplicate of ** (Postgrex.Error) FATAL 08P01 (protocol_violation) no such database: postgres - #3 by humankindof, can you elaborate on the difference?







