Working with Haproxy

Code amendments to allow haproxy to pick mysql running.