having really bad constipation issues

I have not had a BM in about 5 days maybe 6. I've been taking mirilax but it's not working. I've been getting bad low back pains (I know pregnancy in general causes that) but it makes me nauseous it hurts to bad...could me being sooo extremely constipated make that worse? And could this cause harm to my baby? Im 25 weeks and my next appointment is this Friday so I'll be making sure I talk to my doctor but I just would like to know if anyone else has had constipation this bad and did it hurt your baby? And also what did you do for it? Thanks in advance