MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred
Query: DELETE FROM `objectcache` WHERE exptime < '20140919100546'
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('Group-user', 'en')
#11 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(467): MessageCache->get('group-user', true, false)
#12 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(432): wfMsgGetKey('group-user', true, false, true)
#13 /usr/share/mediawiki1.7/includes/GlobalFunctions.php(338): wfMsgReal('group-user', Array, true)
#14 /usr/share/mediawiki1.7/includes/User.php(2779): wfMsg('group-user')
#15 /usr/share/mediawiki1.7/includes/Title.php(1287): User::getGroupName('user')
#16 /usr/share/mediawiki1.7/includes/Title.php(1048): Title->getUserPermissionsErrorsInternal('edit', Object(User), false)
#17 /usr/share/mediawiki1.7/includes/Title.php(1020): Title->userCan('edit', false)
#18 /usr/share/mediawiki1.7/includes/parser/ParserCache.php(32): Title->quickUserCan('edit')
#19 /usr/share/mediawiki1.7/includes/parser/ParserCache.php(45): ParserCache->getKey(Object(CategoryPage), Object(User))
#20 /usr/share/mediawiki1.7/includes/Article.php(742): ParserCache->getETag(Object(CategoryPage), Object(User))
#21 /usr/share/mediawiki1.7/includes/CategoryPage.php(29): Article->view()
#22 /usr/share/mediawiki1.7/includes/Wiki.php(437): CategoryPage->view()
#23 /usr/share/mediawiki1.7/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(CategoryPage), Object(Title), Object(User), Object(WebRequest))
#24 /var/lib/mediawiki1.7/index.php(93): MediaWiki->initialize(Object(Title), Object(CategoryPage), Object(OutputPage), Object(User), Object(WebRequest))
#25 {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}