refactor MySQL configuration