Spectroscopy of a single Mg+ ion