MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred
Query: SELECT user_id FROM `user` WHERE user_name = 'RobinGallowglass' LIMIT 1
Function: User::idFromName
Error: 2002 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) (localhost)
' in /usr/share/mediawiki1.7/includes/db/Database.php:606
Stack trace:
#0 /usr/share/mediawiki1.7/includes/db/Database.php(561): Database->reportQueryError('Can't connect t...', 2002, 'SELECT user_id...', 'User::idFromNam...', false)
#1 /usr/share/mediawiki1.7/includes/db/Database.php(969): Database->query('SELECT user_id...', 'User::idFromNam...')
#2 /usr/share/mediawiki1.7/includes/db/Database.php(1045): Database->select('user', Array, Array, 'User::idFromNam...', Array, Array)
#3 /usr/share/mediawiki1.7/includes/User.php(404): Database->selectRow('user', Array, Array, 'User::idFromNam...')
#4 /usr/share/mediawiki1.7/includes/SkinTemplate.php(908): User::idFromName('RobinGallowglas...')
#5 /usr/share/mediawiki1.7/includes/SkinTemplate.php(448): SkinTemplate->buildNavUrls()
#6 /usr/share/mediawiki1.7/includes/OutputPage.php(821): SkinTemplate->outputPage(Object(OutputPage))
#7 /usr/share/mediawiki1.7/includes/Wiki.php(337): OutputPage->output()
#8 /var/lib/mediawiki1.7/index.php(94): MediaWiki->finalCleanup(Array, Object(OutputPage))
#9 {main}

Exception caught inside exception handler: exception 'DBUnexpectedError' with message 'Error in fetchObject(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) (localhost)' in /usr/share/mediawiki1.7/includes/db/Database.php:735
Stack trace:
#0 /usr/share/mediawiki1.7/includes/db/Database.php(2620): Database->fetchObject(false)
#1 /usr/share/mediawiki1.7/includes/LinkBatch.php(98): ResultWrapper->fetchObject()
#2 /usr/share/mediawiki1.7/includes/LinkBatch.php(78): LinkBatch->addResultToCache(Object(LinkCache), Object(ResultWrapper))
#3 /usr/share/mediawiki1.7/includes/LinkBatch.php(68): LinkBatch->executeInto(Object(LinkCache))
#4 /usr/share/mediawiki1.7/includes/Skin.php(208): LinkBatch->execute()
#5 /usr/share/mediawiki1.7/includes/Skin.php(184): Skin->preloadExistence()
#6 /usr/share/mediawiki1.7/includes/SkinTemplate.php(106): Skin->initPage(Object(OutputPage))
#7 /usr/share/mediawiki1.7/skins/MonoBook.php(24): SkinTemplate->initPage(Object(OutputPage))
#8 /usr/share/mediawiki1.7/includes/SkinTemplate.php(151): SkinMonoBook->initPage(Object(OutputPage))
#9 /usr/share/mediawiki1.7/includes/OutputPage.php(821): SkinTemplate->outputPage(Object(OutputPage))
#10 /usr/share/mediawiki1.7/includes/Exception.php(150): OutputPage->output()
#11 /usr/share/mediawiki1.7/includes/Exception.php(174): MWException->reportHTML()
#12 /usr/share/mediawiki1.7/includes/Exception.php(260): MWException->report()
#13 /usr/share/mediawiki1.7/includes/Exception.php(294): wfReportException(Object(DBQueryError))
#14 [internal function]: wfExceptionHandler(Object(DBQueryError))
#15 {main}