The simple answer is use “Ignore” instead of “Force”.
This is being posted for one reason, I always try, and error out with a force instead of using ignore. This scenario applies when you want to weed out the duplicate entries, MySQL will error out if there are duplicate entries, you have to ignore simply to give MySQL permission to remove those dups. Here is an example….
To apply a unique index to an existing table (with dups) use:
ALTER IGNORE TABLE `sites` ADD UNIQUE (`url`)
Do NOT use:
FORCE ALTER TABLE `sites` ADD UNIQUE (`url`)
ALTER TABLE FORCE `sites` ADD UNIQUE (`url`)
ALTER FORCE TABLE `sites` ADD UNIQUE (`url`)
Yes, this is all basic stuff. I just want to help others making this same elementary mistake. It also helps to know if I get in the same jam a year from now, I have my own blog to search for the answer.