"flyctl proxy 3306 -a my-mysql2" returns "my-mysql2.internal: host was not found in DNS"

Hello

I am following Use a MySQL Database · Fly Docs precisely, copy and pasting everything as is from the article, except using “my-mysql2” because “my-mysql” is already taken.

Everything works up to the point of connecting to the DB from outside with flyctl proxy 3306 -a my-mysql2. The result is always the same:

Error: my-mysql2.internal: host was not found in DNS

Ping fly ping my-mysql2.internal doesn’t work as well:

Error: look up my-mysql2.internal: lookup my-mysql2.internal on 69.27.0.130:53: no such host

However fly ssh console --verbose works:

Connecting to fdaa:3:5c1e:a7b:1e4:fa1d:2cb8:2... complete
[root@32875774c11648 /]#

Logs:

 Waiting for logs...

2023-10-31T17:25:22.087 runner[32875774c11648] lax [info] Pulling container image registry-1.docker.io/library/mysql:8.0.32

2023-10-31T17:25:31.150 runner[32875774c11648] lax [info] Successfully prepared image registry-1.docker.io/library/mysql:8.0.32 (9.063106872s)

2023-10-31T17:25:31.606 runner[32875774c11648] lax [info] Setting up volume 'mysqldata'

2023-10-31T17:25:31.606 runner[32875774c11648] lax [info] Uninitialized volume 'mysqldata', initializing...

2023-10-31T17:25:31.606 runner[32875774c11648] lax [info] Encrypting volume

2023-10-31T17:25:38.058 runner[32875774c11648] lax [info] Opening encrypted volume

2023-10-31T17:25:40.045 runner[32875774c11648] lax [info] Formatting volume

2023-10-31T17:25:40.773 runner[32875774c11648] lax [info] Configuring firecracker

2023-10-31T17:25:40.929 app[32875774c11648] lax [info] [ 0.041081] Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!

2023-10-31T17:25:40.962 app[32875774c11648] lax [info] [ 0.042506] PCI: Fatal: No config space access function found

2023-10-31T17:25:41.147 app[32875774c11648] lax [info] INFO Starting init (commit: 15238e9)...

2023-10-31T17:25:41.158 app[32875774c11648] lax [info] INFO Mounting /dev/vdb at /data w/ uid: 0, gid: 0 and chmod 0755

2023-10-31T17:25:41.160 app[32875774c11648] lax [info] INFO Resized /data to 1056964608 bytes

2023-10-31T17:25:41.162 app[32875774c11648] lax [info] INFO Preparing to run: `docker-entrypoint.sh --datadir /data/mysql --default-authentication-plugin mysql_native_password --performance-schema=OFF --innodb-buffer-pool-size 64M` as root

2023-10-31T17:25:41.166 app[32875774c11648] lax [info] INFO [fly api proxy] listening at /.fly/api

2023-10-31T17:25:41.170 app[32875774c11648] lax [info] 2023/10/31 17:25:41 listening on [fdaa:3:5c1e:a7b:1e4:fa1d:2cb8:2]:22 (DNS: [fdaa::3]:53)

2023-10-31T17:25:41.190 app[32875774c11648] lax [info] 2023-10-31 17:25:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.

2023-10-31T17:25:41.443 app[32875774c11648] lax [info] 2023-10-31 17:25:41+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

2023-10-31T17:25:41.457 app[32875774c11648] lax [info] 2023-10-31 17:25:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.

2023-10-31T17:25:41.595 app[32875774c11648] lax [info] 2023-10-31 17:25:41+00:00 [Note] [Entrypoint]: Initializing database files

2023-10-31T17:25:41.603 app[32875774c11648] lax [info] 2023-10-31T17:25:41.602143Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-10-31T17:25:41.603 app[32875774c11648] lax [info] 2023-10-31T17:25:41.602212Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.

2023-10-31T17:25:41.603 app[32875774c11648] lax [info] 2023-10-31T17:25:41.602240Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.32) initializing of server in progress as process 391

2023-10-31T17:25:41.609 app[32875774c11648] lax [info] 2023-10-31T17:25:41.609505Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-10-31T17:25:41.966 app[32875774c11648] lax [info] 2023-10-31T17:25:41.966358Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-10-31T17:25:42.643 app[32875774c11648] lax [info] 2023-10-31T17:25:42.643809Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

2023-10-31T17:25:44.748 app[32875774c11648] lax [info] 2023-10-31 17:25:44+00:00 [Note] [Entrypoint]: Database files initialized

2023-10-31T17:25:44.750 app[32875774c11648] lax [info] 2023-10-31 17:25:44+00:00 [Note] [Entrypoint]: Starting temporary server

2023-10-31T17:25:44.897 app[32875774c11648] lax [info] 2023-10-31T17:25:44.891990Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-10-31T17:25:44.897 app[32875774c11648] lax [info] 2023-10-31T17:25:44.892294Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.

2023-10-31T17:25:44.897 app[32875774c11648] lax [info] 2023-10-31T17:25:44.892311Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 432

2023-10-31T17:25:44.901 app[32875774c11648] lax [info] 2023-10-31T17:25:44.900936Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-10-31T17:25:45.108 app[32875774c11648] lax [info] 2023-10-31T17:25:45.108214Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-10-31T17:25:45.336 app[32875774c11648] lax [info] 2023-10-31T17:25:45.336586Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2023-10-31T17:25:45.336 app[32875774c11648] lax [info] 2023-10-31T17:25:45.336700Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2023-10-31T17:25:45.337 app[32875774c11648] lax [info] 2023-10-31T17:25:45.337397Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2023-10-31T17:25:45.352 app[32875774c11648] lax [info] 2023-10-31T17:25:45.352464Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock

2023-10-31T17:25:45.352 app[32875774c11648] lax [info] 2023-10-31T17:25:45.352632Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.

2023-10-31T17:25:45.360 app[32875774c11648] lax [info] 2023-10-31 17:25:45+00:00 [Note] [Entrypoint]: Temporary server started.

2023-10-31T17:25:45.394 app[32875774c11648] lax [info] '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'

2023-10-31T17:25:45.915 app[32875774c11648] lax [info] Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.

2023-10-31T17:25:45.915 app[32875774c11648] lax [info] Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.

2023-10-31T17:25:45.915 app[32875774c11648] lax [info] Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.

2023-10-31T17:25:46.958 app[32875774c11648] lax [info] Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.

2023-10-31T17:25:46.958 app[32875774c11648] lax [info] Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.

2023-10-31T17:25:46.958 app[32875774c11648] lax [info] Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.

2023-10-31T17:25:47.058 app[32875774c11648] lax [info] 2023-10-31 17:25:47+00:00 [Note] [Entrypoint]: Creating database some_db

2023-10-31T17:25:47.068 app[32875774c11648] lax [info] 2023-10-31 17:25:47+00:00 [Note] [Entrypoint]: Creating user non_root_user

2023-10-31T17:25:47.077 app[32875774c11648] lax [info] 2023-10-31 17:25:47+00:00 [Note] [Entrypoint]: Giving user non_root_user access to schema some_db

2023-10-31T17:25:47.086 app[32875774c11648] lax [info] 2023-10-31 17:25:47+00:00 [Note] [Entrypoint]: Stopping temporary server

2023-10-31T17:25:47.100 app[32875774c11648] lax [info] 2023-10-31T17:25:47.099084Z 13 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.32).

2023-10-31T17:25:47.765 app[32875774c11648] lax [info] 2023-10-31T17:25:47.765184Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32) MySQL Community Server - GPL.

2023-10-31T17:25:48.104 app[32875774c11648] lax [info] 2023-10-31 17:25:48+00:00 [Note] [Entrypoint]: Temporary server stopped

2023-10-31T17:25:48.105 app[32875774c11648] lax [info] 2023-10-31 17:25:48+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2023-10-31T17:25:48.256 app[32875774c11648] lax [info] 2023-10-31T17:25:48.251985Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-10-31T17:25:48.256 app[32875774c11648] lax [info] 2023-10-31T17:25:48.252160Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.

2023-10-31T17:25:48.256 app[32875774c11648] lax [info] 2023-10-31T17:25:48.252177Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 313

2023-10-31T17:25:48.259 app[32875774c11648] lax [info] 2023-10-31T17:25:48.259463Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-10-31T17:25:48.502 app[32875774c11648] lax [info] 2023-10-31T17:25:48.502322Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-10-31T17:25:48.692 app[32875774c11648] lax [info] 2023-10-31T17:25:48.692395Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2023-10-31T17:25:48.692 app[32875774c11648] lax [info] 2023-10-31T17:25:48.692505Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2023-10-31T17:25:48.693 app[32875774c11648] lax [info] 2023-10-31T17:25:48.693390Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2023-10-31T17:25:48.713 app[32875774c11648] lax [info] 2023-10-31T17:25:48.713290Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock

2023-10-31T17:25:48.713 app[32875774c11648] lax [info] 2023-10-31T17:25:48.713509Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. 
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.