on shutdown hook to terminate mysql