some refactoring to pull mysql connection info to ConnectionManager