Fix: the file name database is damaged

Symptom

You see an error message similar to this:

The file name database is damaged.

How to fix

Delete the file name database files:

del "%LOCALAPPDATA%\MiKTeX\2.9\miktex\data\le\*.fndb-5"
del "%LOCALAPPDATA%\MiKTeX\2.9\miktex\data\le\*.fndb-5.log"
del "%PROGRAMDATA%\MiKTeX\2.9\miktex\data\le\*.fndb-5"
del "%PROGRAMDATA%\MiKTeX\2.9\miktex\data\le\*.fndb-5.log"

Recreate the file name database:

initexmf -u
initexmf --admin -u