repair mysql database if necessary