I can't tell enough from the post to know what's going on for real, and if you are basing everything on what your child tells you rather than on your own direct talks with the teacher, the principal, other parents -- you need to start having those talks.
How is it possible for a child to bring home a paper marked 100 percent correct but receive an online grade of D or F? Is that D or F for that specific, one paper, or is that the overall class grade? Are we talking about your seeing a single assignment that was marked 100 but you haven't seen her other assignments -- so if all of them were Fs you wouldn't know until you saw the final class grade? I'm very confused about this system you describe, with a very early start (she's been in school two months and it's August? Is this a year-round school calendar?) and online grades. Can you fill us in with more details?
It would help to know and talk with her other teachers too. If she loves the other teachers and they say she's doing fine and her other grades are much higher than D or F with other teachers -- that is a huge sign that yes, this teacher and this class are an issue.
You also don't tell us what specifically you and your daughter define as a "mean" teacher. Does the teacher pick on her, call her names, betlittle her in front of other kids? Or does the teacher just push her to work harder or work differently than she would like? Would your child like school if not for this teacher, or is there some larger issue of not liking school overall that's going on?
I think you'll say here that the teacher yells at your child and that's what's mean but to be honest, kids tend to think that any adult is "yelling" at them if the adult corrects them. I have told my daughter to do something and been informed by her that I was "yelling" at her when I never raised my voice. I know for sure that she has described teachers as "yelling" at kids when the teacher simply told a child to do something but did not yell as an adult would interpret yelling. Kids this age are sensitive and see any correction or direction they don't like as "yelling" at times, so take that into consideration. I am not saying your child is lying! I am saying to consider that she is eight, and "yelling" is a red flag word for kids this age. This is where it would help if you really knew other parents at school well enough to ask things like, "Your child had Ms. X last year -- did you find that she was a 'yeller'? Does she seem really loud and strict to you?" and so on.
I am not saying this isn't a bad teacher; I'm just saying we have nothing to work with here, no details at all.
You said you "went to the school with her and she talked to the school about it." Again, what did that really mean? The way you describe it there, it sounds as if your eight-year-old did all the talking to school officials -- surely not? Did you, yourself, meet directly with the teacher (preferably without your child present!)?
If you have not sat down with this teacher in person and without your child there, you need to do that immediately. It sounds as if they may have a conflict of personalities and/or learning styles, or your child may dislike something other than the teacher -- such as the subjects themselves, so when she's pushed to do certain things, she interprets it as "mean" of the teacher. Is that possible?
If the teacher seems to play favorites -- do you have only your child's word for that, or do you have other evidence? Do you talk often to other parents of kids in this class so you can get a sense of what they think and what kids other than your child experience with this teacher? It could be that the teacher does indeed favor some kids, or it could be that your daughter just perceives that and it isn't real "favoritism." You can't take an eight-year-old's word entirely on what's happening in a classroom every time. She will see things through her own lens and that is normal, but as the parent you need to have strong links with other parents, a line of communication with the teacher and all her other teachers, and you need to spend time IN the school volunteering or whatever so you can get the overall vibe.
Does she have only this one teacher??