in reply to Error while running query in perl

You have found the problem, but really, what makes you think that an error like Utilizing read-only DB host is something that can be solved with the help of Perlmonks, instead of fixing the database servers configuration?