Manual:RefreshLinks.php

refreshLinks.php is a maintenance script used to [re]fill pagelinks, categorylinks, imagelinks tables. You should run it if you found that Categories are empty or doesn't show all pages, if "What links here?" doesn't work well or in some other link-related trouble.

Invocation
php maintenance/refreshLinks.php [starting_article] There are more options, you may RTFS them by gvim maintenance/refreshLinks.php

Example
vi-notebook:/var/lib/mediawiki1.7# php maintenance/refreshLinks.php Refreshing link table. Starting from page_id 1 of 1426. 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400