"It was a very private relationship going in," he told DeGeneres on Tuesday's edition of her show. "It was a private relationship during and it's a private relationship still."
DeGeneres said she is a friend of Perry's and knows she and Mayer broke up some time after the Grammy Awards ceremony in February.
"I just want to say, I love you and my thoughts are with you," DeGeneres told Mayer, who thanked her for her support.
"I can understand asking the question based on some previous answers I have given but I have finally learned how to put the wall between one thing and the other," he said, referring to how he was criticized for talking about his past courtships with Jennifer Aniston and Jessica Simpson.
"I've been much happier since then," Mayer said. "I'm on the same journey as everyone else. Coupling is a tricky thing."