Waiting for database - printed too late
Aunmag opened this issue · comments
Aunmag commented
While using docker compose, the "Waiting for database" message is being printed too late, just right before "Applying: ...". So it is hard to know when dbmate actually starts to wait for the DB (if it does).
mta-server-db-1 | 2022-08-10 10:17:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
mta-server-db-1 | 2022-08-10 10:17:09+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mta-server-db-1 | 2022-08-10 10:17:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
mta-server-db-1 | 2022-08-10 10:17:09+00:00 [Note] [Entrypoint]: Initializing database files
mta-server-db-1 | 2022-08-10T10:17:09.539298Z 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.
mta-server-db-1 | 2022-08-10T10:17:09.539487Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.30) initializing of server in progress as process 43
mta-server-db-1 | 2022-08-10T10:17:09.545227Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mta-server-db-1 | 2022-08-10T10:17:09.568013Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
mta-server-db-1 | 2022-08-10T10:17:19.599258Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mta-server-db-1 | 2022-08-10T10:17:27.432178Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
mta-server-db-1 | 2022-08-10 10:17:50+00:00 [Note] [Entrypoint]: Database files initialized
mta-server-db-1 | 2022-08-10 10:17:50+00:00 [Note] [Entrypoint]: Starting temporary server
mta-server-db-1 | 2022-08-10T10:17:50.735857Z 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.
mta-server-db-1 | 2022-08-10T10:17:50.740895Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 94
mta-server-db-1 | 2022-08-10T10:17:50.744656Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mta-server-db-1 | 2022-08-10T10:17:50.776887Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
mta-server-db-1 | 2022-08-10T10:17:52.378736Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mta-server-db-1 | 2022-08-10T10:17:55.512098Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
mta-server-db-1 | 2022-08-10T10:17:55.512506Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
mta-server-db-1 | 2022-08-10T10:17:55.520080Z 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.
mta-server-db-1 | 2022-08-10T10:17:55.801173Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
mta-server-db-1 | 2022-08-10T10:17:55.801276Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.30' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
mta-server-db-1 | 2022-08-10 10:17:55+00:00 [Note] [Entrypoint]: Temporary server started.
mta-server-db-1 | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
mta-server-db-1 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mta-server-db-1 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
mta-server-db-1 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
mta-server-db-1 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mta-server-db-1 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
mta-server-db-1 | 2022-08-10 10:17:59+00:00 [Note] [Entrypoint]: Creating database mta
mta-server-db-1 | 2022-08-10 10:17:59+00:00 [Note] [Entrypoint]: Creating user mta_server
mta-server-db-1 | 2022-08-10 10:17:59+00:00 [Note] [Entrypoint]: Giving user mta_server access to schema mta
mta-server-db-1 |
mta-server-db-1 | 2022-08-10 10:17:59+00:00 [Note] [Entrypoint]: Stopping temporary server
mta-server-db-1 | 2022-08-10T10:17:59.714683Z 13 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.30).
mta-server-db-1 | 2022-08-10T10:18:07.275424Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
mta-server-db-1 | 2022-08-10 10:18:07+00:00 [Note] [Entrypoint]: Temporary server stopped
mta-server-db-1 |
mta-server-db-1 | 2022-08-10 10:18:07+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
mta-server-db-1 |
mta-server-db-1 | 2022-08-10T10:18:07.887870Z 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.
mta-server-db-1 | 2022-08-10T10:18:07.892503Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
mta-server-db-1 | 2022-08-10T10:18:07.896191Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mta-server-db-1 | 2022-08-10T10:18:07.909328Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
mta-server-db-1 | 2022-08-10T10:18:09.787687Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mta-server-db-1 | 2022-08-10T10:18:12.672389Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
mta-server-db-1 | 2022-08-10T10:18:12.672617Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
mta-server-db-1 | 2022-08-10T10:18:12.682188Z 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.
mta-server-db-1 | 2022-08-10T10:18:12.900186Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
mta-server-db-1 | 2022-08-10T10:18:12.900267Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.30' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
mta-server-db-migrations-1 | Waiting for database...............................................................
mta-server-db-migrations-1 | Applying: 20220809153010_initial.sql
mta-server-db-migrations-1 exited with code 0
Adrian Macneil commented
This sounds like a problem with docker compose, not dbmate.