fix: replace mysqladmin with PHP mysqlnd for MySQL 8 compatibility
The MariaDB CLI client (default-mysql-client on Debian) cannot complete the caching_sha2_password handshake used by MySQL 8.0, so the entrypoint wait loop never exited. - Dockerfile: remove default-mysql-client (no longer needed) - docker-entrypoint.sh: wait loop now uses a PHP one-liner via mysqli_connect (same mysqlnd driver the app uses — if it connects, the app will too) - docker-compose.yml: health check pings via local socket without credentials (mysqladmin ping -h localhost --silent works inside the DB container) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,7 @@ services:
|
||||
# MySQL 8 defaults to caching_sha2_password; keep native auth for broad client compat
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "videodb", "-pvideodb_secret"]
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
|
||||
Reference in New Issue
Block a user