Topic on Project:Support desk

136.49.134.179 (talkcontribs)

I am trying to move my wiki to another server and upgrade to 1.33.1 from version 1.23.6- I downloaded mediawiki version 1.33.1 to my new server, created a new database, and moved the old database back up to the new wiki database using

mysql -u wikidb_user -p wikidb < dump_of_wikidb.sql

I also moved LocalSettings.php from the old wiki to the new wiki and changed the

$wgDBtype       

$wgDBserver     

$wgDBname     

$wgDBuser       

$wgDBpassword 

fields to match the new database.

When I try and run update.php, I get a MediaWiki internal error:

[9ec31f1099e6c45e34cc8d47] [no req]   Wikimedia\Rdbms\DBConnectionError from line 1213 of /tmp/mediawiki-1.33.1/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (10.34.33.155)

Backtrace:

#0 /tmp/mediawiki-1.33.1/includes/libs/rdbms/loadbalancer/LoadBalancer.php(758): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /tmp/mediawiki-1.33.1/includes/GlobalFunctions.php(2637): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, boolean)

#2 /tmp/mediawiki-1.33.1/maintenance/Maintenance.php(1375): wfGetDB(integer, array, boolean)

#3 /tmp/mediawiki-1.33.1/maintenance/update.php(147): Maintenance->getDB(integer)

#4 /tmp/mediawiki-1.33.1/maintenance/doMaintenance.php(96): UpdateMediaWiki->execute()

#5 /tmp/mediawiki-1.33.1/maintenance/update.php(275): require_once(string)

#6 {main}


Why is connection not working? I am able to connect through mysql manually with the fields I put in LocalSettings.php

Bawolff (talkcontribs)

you're sure you are using the exact same info when connecting manually? (Mysql can be tricky, access can be per host so connecting from a different server is not the same thing. For that matter, connecting to localhost is considered different than connecting to 127.0.0.1, and so on)

136.49.134.179 (talkcontribs)

yes, using the same info - the info in LocalSettings.php is

$wgDBtype           = "mysql";

$wgDBserver         = "10.34.33.155";

$wgDBname           = "wikidb";

$wgDBuser           = "wikidb_user";


and the command I use to connect with mysql is:

mysql -h 10.34.33.155 -u wikidb_user -p


and I use the password specified in LocalSettings.php. But when I run SELECT DATABASE() after connecting through mysql, it returns null unless I connect with mysql -h 10.34.33.155 -u wikidb_user -p wikidb

170.248.143.23 (talkcontribs)

The issue was in the version of mysql that I am using - version 8.0.4 has a new authentication plugin : caching_sha2_password, which was not present in earlier versions. To connect you can downgrade mysql version or run

ALTER USER 'wikidb_user'@'10.34.33.155' IDENTIFIED WITH mysql_native_password BY 'password';

Reply to "update to 1.33.1"