MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred
Query: SELECT old_text,old_flags FROM `text` WHERE old_id = '524879' LIMIT 1
Function: Revision::loadText
Error: 1317 Query execution was interrupted (localhost)
' in /data/web/mediawiki-1.13.2/includes/db/Database.php:606
Stack trace:
#0 /data/web/mediawiki-1.13.2/includes/db/Database.php(561): Database->reportQueryError('Query execution...', 1317, 'SELECT old_tex...', 'Revision::loadT...', false)
#1 /data/web/mediawiki-1.13.2/includes/db/Database.php(969): Database->query('SELECT old_tex...', 'Revision::loadT...')
#2 /data/web/mediawiki-1.13.2/includes/db/Database.php(1045): Database->select('text', Array, Array, 'Revision::loadT...', Array, Array)
#3 /data/web/mediawiki-1.13.2/includes/Revision.php(816): Database->selectRow('text', Array, Array, 'Revision::loadT...')
#4 /data/web/mediawiki-1.13.2/includes/Revision.php(523): Revision->loadText()
#5 /data/web/mediawiki-1.13.2/includes/Revision.php(536): Revision->getRawText()
#6 /data/web/mediawiki-1.13.2/includes/Article.php(439): Revision->revText()
#7 /data/web/mediawiki-1.13.2/includes/Article.php(300): Article->fetchContent(533742)
#8 /data/web/mediawiki-1.13.2/includes/Article.php(218): Article->loadContent()
#9 /data/web/mediawiki-1.13.2/includes/Article.php(803): Article->getContent()
#10 /data/web/mediawiki-1.13.2/includes/Wiki.php(437): Article->view()
#11 /data/web/mediawiki-1.13.2/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#12 /data/web/mediawiki-1.13.2/index.php(93): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#13 /data/web/root/index.php(3): require('/data/web/media...')
#14 {main}

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