Being an engineer who instinctually digs into details, Yahoo CEO Marissa Mayer admits that she’s tended to forget one of the keys to successful leadership: bold action.

On Monday evening at the annual Fortune Most Powerful Women dinner in New York City, Mayer told me on stage that the best leadership advice she ever got came from Google co-founder Sergey Brin in July 2012, on the day she was leaving Google GOOG to join Yahoo YHOO .

It was literally minutes before Yahoo announced that its board of directors had chosen Mayer to be the new CEO, and she was saying goodbye to Brin, whom she had worked with at Google for 13 years. “Sergey gave me all kinds of advice and encouragement. He said he would miss me, but also said, ‘Here are my ideas about Yahoo,'” she recalled. “He went into like immediate minutiae. Change the logo, which we did. Change all these different things.”

Determined to get outside before the big news broke (and to meet her mom, who was right there on Google’s campus, waiting to help her through the transition), Mayer recalls: “I had my hand on the door, saying, ‘Sergey, it’s time for me to go, I’ve got to go.'”

But Brin talked on: “Marissa, wait!” She turned around, “and he looked at me and he said: ‘Don’t forget to be bold.'”

Three years later, she says, “I actually hear that in my head every single day that I’m at Yahoo.”

She passed on this advice to the Fortune MPW audience: “If you really want to create something transformational — if you really want to make a difference in your life and other people’s lives — yes, it’s always easy to take the safer incremental choice and to iterate…But remember to be bold.”

These days at Yahoo, she explained, “that has helped me in so many different moments, be it deciding whether or not to acquire Tumblr, deciding what to do with our Alibaba BABA stake that ended up being worth somewhere on the order of $30 to $40 billion. And so, to have that as the refrain in the back of my head was actually really helpful.”