The Wimbledon champion fought off two break points in the eighth game of the third set and then broke Alexandrova to serve for the match.
Elina Svitolina, a Wimbledon semifinalist, easily reached the third round with a 6-4, 6-1 win over Elise Mertens.
On the men’s side, sixth-seeded Kei Nishikori lost to Yoshihito Nishioka 7-6 (2), 6-4.
Nishikori became the seventh seeded man and the 15th out of 32 seeds in the men’s and women’s draws to either lose or withdraw during the first two rounds. That includes No. 2-ranked Rafael Nadal (fatigue) and No. 8 Serena Williams (back injury).