HERE and HERE
Both are a little outdated, with the latter being way back from 2012 but with a little logic you should be able to delete the instance from mysql. The second link offers the creation of a script for deleteing all instances with error marker in db.