MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred
Query: DELETE FROM `objectcache` WHERE exptime < '20140919000910'
Function: MediaWikiBagOStuff::_doquery
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, 'DELETE FROM `ob...', 'MediaWikiBagOSt...', false)
#1 /usr/share/mediawiki1.7/includes/BagOStuff.php(433): Database->query('DELETE FROM `ob...', 'MediaWikiBagOSt...')
#2 /usr/share/mediawiki1.7/includes/BagOStuff.php(319): MediaWikiBagOStuff->_doquery('DELETE FROM `ob...')
#3 /usr/share/mediawiki1.7/includes/BagOStuff.php(373): SqlBagOStuff->_query('DELETE FROM $0 ...')
#4 /usr/share/mediawiki1.7/includes/BagOStuff.php(362): SqlBagOStuff->expireall()
#5 /usr/share/mediawiki1.7/includes/BagOStuff.php(237): SqlBagOStuff->garbageCollect()
#6 /usr/share/mediawiki1.7/includes/BagOStuff.php(99): SqlBagOStuff->get('wikidb:messages...')
#7 /usr/share/mediawiki1.7/includes/MessageCache.php(419): BagOStuff->add('wikidb:messages...', 'loading', 60)
#8 /usr/share/mediawiki1.7/includes/MessageCache.php(250): MessageCache->saveToCaches(Array, false, 'en')
#9 /usr/share/mediawiki1.7/includes/MessageCache.php(606): MessageCache->load('en')
#10 /usr/share/mediawiki1.7/includes/MessageCache.php(543): MessageCache->getMsgFromNamespace('Whatlinkshere', 'en')
#11 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(467): MessageCache->get('whatlinkshere', true, false)
#12 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(432): wfMsgGetKey('whatlinkshere', true, false, true)
#13 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(338): wfMsgReal('whatlinkshere', Array, true)
#14 /usr/share/mediawiki1.7/includes/SpecialPage.php(773): wfMsg('whatlinkshere')
#15 /usr/share/mediawiki1.7/includes/SpecialPage.php(723): SpecialPage->getDescription()
#16 /usr/share/mediawiki1.7/includes/SpecialPage.php(735): SpecialPage->setHeaders()
#17 /usr/share/mediawiki1.7/includes/SpecialPage.php(534): SpecialPage->execute('Bregowine')
#18 /usr/share/mediawiki1.7/includes/Wiki.php(224): SpecialPage::executePath(Object(Title))
#19 /usr/share/mediawiki1.7/includes/Wiki.php(55): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#20 /var/lib/mediawiki1.7/index.php(93): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
#21 {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/MessageCache.php(330): Database->fetchObject(false)
#1 /usr/share/mediawiki1.7/includes/MessageCache.php(264): MessageCache->loadFromDB('en')
#2 /usr/share/mediawiki1.7/includes/MessageCache.php(606): MessageCache->load('en')
#3 /usr/share/mediawiki1.7/includes/MessageCache.php(543): MessageCache->getMsgFromNamespace('Databaseerror', 'en')
#4 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(467): MessageCache->get('databaseerror', true, false)
#5 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(432): wfMsgGetKey('databaseerror', true, false, true)
#6 /usr/share/mediawiki1.7/includes/Exception.php(70): wfMsgReal('databaseerror', Array)
#7 /usr/share/mediawiki1.7/includes/db/Database.php(2565): MWException->msg('databaseerror', 'Database error')
#8 /usr/share/mediawiki1.7/includes/Exception.php(139): DBQueryError->getPageTitle()
#9 /usr/share/mediawiki1.7/includes/Exception.php(174): MWException->reportHTML()
#10 /usr/share/mediawiki1.7/includes/Exception.php(260): MWException->report()
#11 /usr/share/mediawiki1.7/includes/Exception.php(294): wfReportException(Object(DBQueryError))
#12 [internal function]: wfExceptionHandler(Object(DBQueryError))
#13 {main}