mysql disconnect function added on shutdown