The db-proxy image for PAWS makes a fairly simple database connection to the wiki replicas using its own tool auth and a shared key with the Jupyterhub application. This allows people to use wiki replica connections in their notebooks like https://paws-public.wmflabs.org/paws-public/User:Jtmorgan/ds4ux/paws-cheatsheet.ipynb
Interestingly, the database auth lua doesn't seem entirely necessary because the pods have credentials in the env (and the connection fails without them at least with pymysql), so I may try locally with a simple haproxy or external name service.