A vaginal pH of 4.5 or higher is a sign of bacterial vaginosis. Treatment To treat bacterial vaginosis, your doctor may prescribe one of the following medications: Metronidazole (Flagyl, Metrogel-Vaginal, others). This medicine may be taken as a pill by mouth (orally).