MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred
Query: DELETE FROM `objectcache` WHERE exptime < '20140919020041'
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/MessageCache.php(246): SqlBagOStuff->get('wikidb:messages...')
#7 /usr/share/mediawiki1.7/includes/MessageCache.php(606): MessageCache->load('en')
#8 /usr/share/mediawiki1.7/includes/MessageCache.php(543): MessageCache->getMsgFromNamespace('Pagetitle', 'en')
#9 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(467): MessageCache->get('pagetitle', true, false)
#10 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(432): wfMsgGetKey('pagetitle', true, false, true)
#11 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(338): wfMsgReal('pagetitle', Array, true)
#12 /usr/share/mediawiki1.7/includes/OutputPage.php(239): wfMsg('pagetitle', 'Ryan Mac Whyte')
#13 /usr/share/mediawiki1.7/includes/Article.php(724): OutputPage->setPageTitle('Ryan Mac Whyte')
#14 /usr/share/mediawiki1.7/includes/Wiki.php(437): Article->view()
#15 /usr/share/mediawiki1.7/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#16 /var/lib/mediawiki1.7/index.php(93): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#17 {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}