The musician and the comedian have known each other for years.
In honor of the occasion, Mayer shared a shot of the birthday girl standing outside with a dog. "Happy birthday @cazziedavid," he wrote. "I care for you a great deal! Enjoy your special day."
David reposted Mayer's message without comment on her Instagram Story.
The post came just days after multiple outlets obtained photos of Mayer and David having dinner together in Studio City, California.
A source tells ET that Mayer and David are currently just good friends.
"They share a lot of similar interests and mutual friends and think each other is hilarious," the source says. "There have been points over the years where Cazzie thought she might want more than a friendship with John and same with John towards her, but right now they're friends."
Mayer and David have known each other for years. In fact, in 2018, Mayer invited the comedian on his Instagram Live talk show, Current Mood, to grill him about his love life.
During the chat, Mayer revealed that he's slept with less than 500 women in his life and confessed to using his music "to hook up a few times." He also shared how he's changed as he's gotten older, following relationships with A-listers including Jennifer Love Hewitt, Jessica Simpson, Jennifer Aniston, Taylor Swift and Katy Perry.
"I find people not being into me brings a real level of reality into my life, whereas when I was in my early 20s where I really couldn’t miss, I kind of abused that," he said in part. "Not so long ago I gave a girl my number and she said, 'I probably won’t use it.'"
David split from Pete Davidson in 2018 after more than a year together. Watch the video below for more on their breakup.