Topic on Project:Support desk

Upgrading mediawiki version

9
92.83.196.215 (talkcontribs)

Hey. I upgraded mediawiki from 1.25.2 to 1.27.1, on my testwiki, on xampp, using git. I used <nowiki>git clone -b REL1_27 https://gerrit.wikimedia.org/r/mediawiki/core</nowiki> and cloned it to htdocs in the xampp folder. Then I installed composer in the new mediawiki version. I must mention that I only managed to do the first step of the installation instructions for composer, as it gave an error at the second one 'corrupted installer'. I downloaded the composer.phar snapshot manually then managed to install it, after all, using the instruction provided on this wiki. Then I copied the extensions, images and localsettings from the old medawiki and ran both the web updater and update.php from the shell (just to be extra sure). The problem was that, every time I tried to log in, it would redirect me to the old version. After I moved the old version out of the folder, it gave me an error saying it can't find the site. So what I did was change the name of the new version to that of the old version. It worked, but I couldn't log in using the credentials that I had. It still let me log in on the wiki, though, because, after two failed tries, the option to 'skip' appeared. So I changed the password in the database, to both the root account and the personal account and now I got this error and I just can't get around to it:

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)


You can try searching via Google in the meantime.

Note that their indexes of our content may be out of date.

I really don't know what else to do. I can't understand how to change the database to the new version, without having to change the name of the new version. Maybe I need to move the accounts or something? What am I doing wrong? Please reply as I would like to do the same thing on the real wiki. I must mention I used git clone instead of git checkout because the old version was downloaded and unzipped manually. I would appreciate any help. Thanks!

87.123.55.96 (talkcontribs)

So to sum it up, you say that you have installed the new version, that you have successfully updated the database. Basically at this point your upgrade is finished. If there are no problems, this would be it. There is nothing needed to change names or to move an account. At this point, you realized that you are having a problem with login, that is that login did not work.

The error message "Cannot access the database" points to wrong database credentials. I don't know, what you have changed in the steps where you say that you have changed the password in the database, but I think that what you did there was wrong.

Make sure that in your LocalSettings.php file you are using the correct username and password for your MySQL database! Should you have changed the password of the MySQL user, which you are using to access this database, make sure that both, the password as stored in MySQL and in LocalSettings.php, are the same!

Note that these credentials, of the MySQL user, which you also have in LocalSettings.php, are different from the credentials of MediaWiki users - even if you might have users inside MediaWiki, which have the same username as the MySQL user.

92.83.196.215 (talkcontribs)

Hey. So, I followed your steps and made sure that both the MySQL password and the one in localsettings match. I, also, saw that there is the script path so I changed that, too. Now, I am not getting any database errors, but even though the passwords match, I am still getting this: "Incorrect password entered. Please try again." I swear I entered the exact same password and username. I really have no idea what to do from here on. Basically, when I changed the password in 'phpmyadmin', I went to user accounts -> chose the right account -> edit privileges -> change password.

87.123.36.240 (talkcontribs)

Can you please specify, where the error message

 "Incorrect password entered. Please try again."

is displayed?

What you had before my answer was that MediaWiki was not working at all, because of wrong database credentials in LocalSettings.php: $wgDBuser and $wgDBpassword. Is it correct that error is solved? Is the wiki basically working now?

92.83.196.215 (talkcontribs)

Yes, the wiki is working now, but I cannot log in using those credentials, even though they are the same '''both''' in phpmyadmin and localsettings.php. I am getting the error message on the login screen (http://prnt.sc/cn06vs). Even though I made extra sure that I was using the right credentials, I kept getting the same error. Then, I simply entered the old password and it gave me this (the old password was made out of 6 letters): http://prntscr.com/cn09b5

92.83.196.215 (talkcontribs)

Well, I'll be damned. I changed the password on the wiki itself (on the second image) and it worked! It used to give a 'Fatal MWexception' or something like that, before, but it worked, thsi time. Anyway, thanks for helping me get through the issue!

This post was hidden by AhmadF.Cheema (history)
87.123.36.240 (talkcontribs)

Please note that you are speaking about two very different things:

  • There is the password for the MySQL database. This password - and the according username - must be put inside LocalSettings.php. They belong inside the variables $wgDBuser and $wgDBpassword. With the error messages, which you are now getting, these two variables, $wgDBuser and $wgDBpassword, both are correct. Do not touch them, they are ok!
  • The second thing is the login into MediaWiki - this is what your two screenshots are showing. This login is using a MediaWiki username and the associated password. Both are stored inside the database (in the user table most likely) and they don't have 'anything to do with the MySQL credentials, which you ave to put into LocalSettings.php. What you need to log in to MediaWiki just is your MediaWiki username and its password.

The usernames inside MediaWiki and the usernames in MySQL (of which is used to access the database), are two completely different things!

92.83.196.215 (talkcontribs)

Since it's a wiki used for testing, I am using the same credentials all over the places and I thought that was the problem.

Reply to "Upgrading mediawiki version"