I have done master-slave replication for performing web-server mirroring. Web contents are getting replicated properly. But I am facing issue in database replication. Database is replicated and slave can read the master log position as well. I have seen various blogs and saw skip errors as a solution but it is not good for our environment as it loses database consistency. I have tried making slave read-only by using read-only=1 in slave database my.cnf but it didn't work. I am just wondering how database table data are getting duplicated even after doing fresh replication.
Error:
Last_Error: Error 'Duplicate entry '155251' for key 'PRIMARY'' on query. Default database:...............