In my Elixir Phoenix app, I have:
username = System.fetch_env!("MYSQL_USERNAME")
password = System.fetch_env!("MYSQL_PASSWORD")
hostname = System.fetch_env!("MYSQL_HOSTNAME")
database = System.fetch_env!("MYSQL_DATABASE")
config :arvore, Arvore.Repo,
username: username,
password: password,
hostname: hostname,
database: database,
stacktrace: true,
protocol: :tcp,
show_sensitive_data_on_connection_error: false,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
socket_options: [:inet6]
I’ve made sure that the connection supports IPV6 and uses TCP. My username, password and database are correct, and for the hostname, I’m using: “db-app-name.internal” just like the docs suggested.
I get this error every time I try to deploy:
INFO Preparing to run: `/app/bin/migrate` as nobody
INFO [fly api proxy] listening at /.fly/api
2023/09/08 17:17:04 listening on [fdaa:2:f9ff:a7b:d5:cbd:b2ec:2]:22 (DNS: [fdaa::3]:53)
** (EXIT from #PID<0.95.0>) shutdown
INFO Main child exited normally with code: 1
INFO Starting clean up.
WARN hallpass exited, pid: 267, status: signal: 15 (SIGTERM)
2023/09/08 17:17:05 listening on [fdaa:2:f9ff:a7b:d5:cbd:b2ec:2]:22 (DNS: [fdaa::3]:53)
[ 2.306350] reboot: Restarting system
machine restart policy set to 'no', not restarting
Error: release command failed - aborting deployment. error release_command machine 32874435c00dd8 exited with non-zero status of 1
I am able to proxy the MySQL database with: “flyctl proxy 3306 -a arvore-vitorlimadev-mysql”
What I am doing wrong?