Jump to content

Topic on Project:Support desk/Flow

DB access error on hosted system after setup

4
98.179.100.201 (talkcontribs)

Hi! I just installed the "I'm bored" setup and I'm getting an error when the software tries to connect to the database. It's using the shared server name and not the configured db server name (even though that's reported). The error (sensitive details obscured) is as follows: Exception caught inside exception handler: [Zww0topbIUZYzy1vPmphxwAAACU] /index.php Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user '<name>'@'<hosting system>' (using password: YES) (<db server name>)

I'm not sure where <hosting system> comes from after trying to track it down the code. Here's the full dump:

MediaWiki internal error.

Original exception: [Zww0topbIUZYzy1vPmphxwAAACU] /index.php Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user '<name>'@'<hosting system>' (using password: YES) (<db server name>)

Backtrace:

from /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1138)

#0 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 /path to/mediawiki-1.42.3/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(747): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array)

#6 /path to/mediawiki-1.42.3/includes/language/LCStoreDB.php(65): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()

#7 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(563): LCStoreDB->get(string, string)

#8 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(609): LocalisationCache->isExpired(string)

#9 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(520): LocalisationCache->initLanguage(string)

#10 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(400): LocalisationCache->loadSubitem(string, string, string)

#11 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(416): LocalisationCache->getSubitem(string, string, string)

#12 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1251): LocalisationCache->getSubitemWithSource(string, string, string)

#13 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1193): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)

#14 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1088): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)

#15 /path to/mediawiki-1.42.3/includes/Message/Message.php(1530): MessageCache->get(string, boolean, LanguageEn)

#16 /path to/mediawiki-1.42.3/includes/Message/Message.php(1018): MediaWiki\Message\Message->fetchMessage()

#17 /path to/mediawiki-1.42.3/includes/Message/Message.php(1105): MediaWiki\Message\Message->format(string)

#18 /path to/mediawiki-1.42.3/includes/title/MalformedTitleException.php(61): MediaWiki\Message\Message->text()

#19 /path to/mediawiki-1.42.3/includes/title/MediaWikiTitleCodec.php(101): MediaWiki\Title\MalformedTitleException->__construct(string, string, array)

#20 /path to/mediawiki-1.42.3/includes/title/MediaWikiTitleCodec.php(411): MediaWiki\Title\MediaWikiTitleCodec::MediaWiki\Title\{closure}(string, string)

#21 /path to/mediawiki-1.42.3/includes/title/Title.php(2754): MediaWiki\Title\MediaWikiTitleCodec->splitTitleString(string, integer)

#22 /path to/mediawiki-1.42.3/includes/title/Title.php(504): MediaWiki\Title\Title->secureAndSplit(string)

#23 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(240): MediaWiki\Title\Title::newFromURL(string)

#24 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(331): MediaWiki\Actions\ActionEntryPoint->parseTitle(MediaWiki\Request\WebRequest)

#25 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(93): MediaWiki\Actions\ActionEntryPoint->getTitle()

#26 /path to/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(199): MediaWiki\Actions\ActionEntryPoint->execute()

#27 /path to/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#28 {main}

Exception caught inside exception handler: [Zww0topbIUZYzy1vPmphxwAAACU] /index.php Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user '<name>'@'<hosting system>' (using password: YES) (<db server name>)

Backtrace:

from /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1138)

#0 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 /path to/mediawiki-1.42.3/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(747): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array)

#6 /path to/mediawiki-1.42.3/includes/language/LCStoreDB.php(65): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()

#7 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(536): LCStoreDB->get(string, string)

#8 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(400): LocalisationCache->loadSubitem(string, string, string)

#9 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(416): LocalisationCache->getSubitem(string, string, string)

#10 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1251): LocalisationCache->getSubitemWithSource(string, string, string)

#11 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1193): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)

#12 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1088): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)

#13 /path to/mediawiki-1.42.3/includes/Message/Message.php(1530): MessageCache->get(string, boolean, LanguageEn)

#14 /path to/mediawiki-1.42.3/includes/Message/Message.php(1018): MediaWiki\Message\Message->fetchMessage()

#15 /path to/mediawiki-1.42.3/includes/Message/Message.php(1105): MediaWiki\Message\Message->format(string)

#16 /path to/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(255): MediaWiki\Message\Message->text()

#17 /path to/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(408): MWExceptionRenderer::msg(string, string)

#18 /path to/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(104): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)

#19 /path to/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(133): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)

#20 /path to/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(237): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)

#21 /path to/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(221): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)

#22 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(82): MediaWiki\MediaWikiEntryPoint->handleTopLevelError(Wikimedia\Rdbms\DBConnectionError)

#23 /path to/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(205): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError(Wikimedia\Rdbms\DBConnectionError)

#24 /path to/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#25 {main}

Bawolff (talkcontribs)

It is normal that '<name>'@'<hosting system>' in the error message should use the IP address of the web server. This is just how mysql formats error message - the ip address is the server making the request, not the database server.

Be sure that the db user being used has all the appropriate rights.

98.179.100.201 (talkcontribs)

Thanks @Bawolff. I have looked in the LocalSettings.php file and the information there matches what I use when logging in using the `mysql` command line tool via ssh to the remote machine.

I'm going to give the web server permissions to the DB and see if that fixes things.

98.179.100.201 (talkcontribs)

Well, that didn't help either. It turns out that the escape character that was placed in the password string wasn't needed. Deleting that allowed the log in.

Reply to "DB access error on hosted system after setup"