Probably not the right forum here, but you have more than one option: either via network configuration providing access to the hosts database networt port or you can add a volume to the container mapping the hosts database socket directory to the container. The container then can connect to the socket file (e.g. /var/run/mysqld/mysqld.sock).
You could run the container with a volume like "-v /var/run/mysqld/:/var/run/mysqld/" to make the socket of the DB available inside the container...
The container requires the database client libs of course to connect to the DB.
Look here for the network option: http://stackoverflow.com/quest…the-localhost-of-the-mach