The database is not bootstrapped in another docker container
Ok, this is solved now, thanks to leymannx and hansfn. I had to also install mysql-client in the workspace container, where drush was being executed from, in addition to the mysql-server running in its own container; mysql-client must have previously been present in the workspace container for a different reason, but some containers were stopped and restarted at some point, so any container-specific installations must have disappeared.