Mailing List Archive

MediaWiki cannot access database after upgrade
Greetings. I've been using MediaWiki in a couple different installations
for over a decade, but I've just run into a problem that has me stumped. It
came after upgrading from 1.29.2 to 1.35.1. The process seemed to go
smoothly, though I had to set the $wgServer variable which wasn't in my
LocalSettings.php. Now I get a persistent message that MediaWiki can't
access the database. Of course I've checked and double checked that the
database name, username, etc. are correct. I can access the database just
fine, but MediaWiki can't. I am using my old LocalSettings.php and wonder
if there could be some other problem there.

Pasting the errors below. Any help is much appreciated.

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)

Backtrace:

#0 /home/stupid_b/barteverson.com/x/includes/libs/rdbms/loadbalancer/LoadBalancer.php(934):
Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /home/stupid_b/barteverson.com/x/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901):
Wikimedia\Rdbms\LoadBalancer->getServerConnection(0,
'everpax-mediawi...', 0)
#2 /home/stupid_b/barteverson.com/x/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046):
Wikimedia\Rdbms\LoadBalancer->getConnection(-1, Array,
'everpax-mediawi...', 0)
#3 /home/stupid_b/barteverson.com/x/includes/GlobalFunctions.php(2469):
Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(-1, Array,
'everpax-mediawi...')
#4 /home/stupid_b/barteverson.com/x/includes/user/User.php(477): wfGetDB(-1)
#5 /home/stupid_b/barteverson.com/x/includes/libs/objectcache/wancache/WANObjectCache.php(1529):
User->{closure}(false, 3600, Array, NULL, Array)
#6 /home/stupid_b/barteverson.com/x/includes/libs/objectcache/wancache/WANObjectCache.php(1376):
WANObjectCache->fetchOrRegenerate('global:user:id:...', 3600,
Object(Closure), Array, Array)
#7 /home/stupid_b/barteverson.com/x/includes/user/User.php(510):
WANObjectCache->getWithSetCallback('global:user:id:...', 3600,
Object(Closure), Array)
#8 /home/stupid_b/barteverson.com/x/includes/user/User.php(421):
User->loadFromCache()
#9 /home/stupid_b/barteverson.com/x/includes/user/User.php(357):
User->loadFromId(0)
#10 /home/stupid_b/barteverson.com/x/includes/session/UserInfo.php(89):
User->load()
#11 /home/stupid_b/barteverson.com/x/includes/session/CookieSessionProvider.php(129):
MediaWiki\Session\UserInfo::newFromId('1')
#12 /home/stupid_b/barteverson.com/x/includes/session/SessionManager.php(492):
MediaWiki\Session\CookieSessionProvider->provideSessionInfo(Object(WebRequest))
#13 /home/stupid_b/barteverson.com/x/includes/session/SessionManager.php(215):
MediaWiki\Session\SessionManager->getSessionInfoForRequest(Object(WebRequest))
#14 /home/stupid_b/barteverson.com/x/includes/WebRequest.php(826):
MediaWiki\Session\SessionManager->getSessionForRequest(Object(WebRequest))
#15 /home/stupid_b/barteverson.com/x/includes/session/SessionManager.php(137):
WebRequest->getSession()
#16 /home/stupid_b/barteverson.com/x/includes/Setup.php(726):
MediaWiki\Session\SessionManager::getGlobalSession()
#17 /home/stupid_b/barteverson.com/x/includes/WebStart.php(89):
require_once('/home/stupid_b/...')
#18 /home/stupid_b/barteverson.com/x/index.php(44):
require('/home/stupid_b/...')
#19 {main}


--

[image: File:CAT+FD Site Icon.png]
Bart Everson


*Creative Generalist for Faculty DevelopmentCAT+FD*

*Pronouns: he him hisPersonal site: BartEverson.com
<http://BartEverson.com>*

Xavier University of Louisiana
o: (504) 520-5164
f: (504) 520-7903
a: 1 Drexel Drive, Box 78
New Orleans, LA 70125
w: *cat.xula.edu <https://cat.xula.edu/>*
e:

*bpeverso@xula.edu <bpeverso@xula.edu> *

--
*E-Mail Privacy/FERPA: This communication may contain confidential
information and is intended solely for the use of the addressee. If you
received it in error, please contact the sender at once and delete the
message. This communication may also contain information subject to
restrictions of the Family Educational Rights and Privacy Act (FERPA). Such
information may not be disclosed or used in any fashion outside the scope
of the service for which you are receiving the information.*
Re: MediaWiki cannot access database after upgrade [ In reply to ]
Happy to report that I fixed the problem described in my previous query. I
did it by making a fresh install in a new database, which generated a
proper LocalSettings.php file. Edited this to point to the old database
and voila -- everything fixed.

So, it would seem the upgrade process may have some issue with old
LocalSettings.php files. Hope this helps somebody.

Bart

--
*E-Mail Privacy/FERPA: This communication may contain confidential
information and is intended solely for the use of the addressee. If you
received it in error, please contact the sender at once and delete the
message. This communication may also contain information subject to
restrictions of the Family Educational Rights and Privacy Act (FERPA). Such
information may not be disclosed or used in any fashion outside the scope
of the service for which you are receiving the information.*
Re: MediaWiki cannot access database after upgrade [ In reply to ]
On Tue, Mar 30, 2021 at 4:30 PM Bart Everson <bpeverso@xula.edu> wrote:
>
> Happy to report that I fixed the problem described in my previous query. I did it by making a fresh install in a new database, which generated a proper LocalSettings.php file. Edited this to point to the old database and voila -- everything fixed.
>
> So, it would seem the upgrade process may have some issue with old LocalSettings.php files. Hope this helps somebody.

Yeah, that seems to happen on occasion with old LocalSettings.php from
previous installations. We have experienced it several times because
we started our wiki in 2005 or so.

One other thing you should be sure to do... run 'php
maintenance/update.php' after each upgrade. If the database changes,
then update.php is what handles the changes for you.

Jeff

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: MediaWiki cannot access database after upgrade [ In reply to ]
Also I would have upgraded in steps. I never recommend doing more than one
LTS worth of jumps at a time. When you Start jumping too many versions
weird things can start happening.

On Tue, Mar 30, 2021 at 4:38 PM Jeffrey Walton <noloader@gmail.com> wrote:

> On Tue, Mar 30, 2021 at 4:30 PM Bart Everson <bpeverso@xula.edu> wrote:
> >
> > Happy to report that I fixed the problem described in my previous query.
> I did it by making a fresh install in a new database, which generated a
> proper LocalSettings.php file. Edited this to point to the old database
> and voila -- everything fixed.
> >
> > So, it would seem the upgrade process may have some issue with old
> LocalSettings.php files. Hope this helps somebody.
>
> Yeah, that seems to happen on occasion with old LocalSettings.php from
> previous installations. We have experienced it several times because
> we started our wiki in 2005 or so.
>
> One other thing you should be sure to do... run 'php
> maintenance/update.php' after each upgrade. If the database changes,
> then update.php is what handles the changes for you.
>
> Jeff
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>