尝试升级到1.22时MediaWiki DB连接错误 [英] MediaWiki DB connection error while attempting to upgrade to 1.22

查看:82
本文介绍了尝试升级到1.22时MediaWiki DB连接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在共享主机服务器上安装了MediaWiki.它的版本为1.19.1,我正在尝试更新为1.22.2.该文档指出,为此只需一步更新即可.

I have a MediaWiki installation on a shared host server. It's at version 1.19.1 and I'm trying to update to 1.22.2. The documentation indicates that a one-step update should be OK for this.

对于过去的更新,我已经成功完成了几次,并且正在遵循以前的说明.我在其中建立了一个包含1.22.2的新目录,将LocalSettings.php/images/文件从正在工作的实时目录复制到了新目录. LocalSettings.php具有用于$wgDBuser$wgDBpassword$wgDBadminuser$wgDBadminpassword的所有条目.

I've done this several times for past updates successfully, and am following previous notes. I set up a new directory with 1.22.2 in it, copied LocalSettings.php and /images/ files from the working live directory to the new one. LocalSettings.php has entries for $wgDBuser, $wgDBpassword, $wgDBadminuser and $wgDBadminpassword all defined.

我可以通过命令行访问服务器,并尝试通过

I have command line access to the server, and tried to run the update process in WikiNew, by

php maintenance/update.php

但它会回应:

DB connection error: Unknown MySQL server host 'localhost:/tmp/mysql5.sock' (34) (localhost:/tmp/mysql5.sock)

如果我在WikiLive中执行相同的操作,则它可以正常工作.当然,当我将1.19.1更新为1.19.1时,它并没有进行任何实际的更新,但是会出现通常的消息类型,但表明不需要更改,并且会清除缓存. LiviWiki,1.19,仍然有效.

If I do the same in WikiLive it works. Of course it does not do any actual update as I'm updating 1.19.1 to 1.19.1, but the usual type of messages appear but with indications that changes are not required, and it purges caches. LiviWiki, 1.19, still works.

因此,LocalSettings.php的两个副本中都存在连接字符串的相同数据,maintenance/update.php的两个副本都在访问相同的MySQL数据库,但是一个副本接受连接字符串,而另一个副本不接受.

So the same data for the connection string exists in both copies of LocalSettings.php, both copies of maintenance/update.php are accessing the same MySQL database, but one accepts the connection string and the other doesn't.

1.19和1.22之间有变化吗?我一直在1.20、1.21和1.22的发行说明中寻找配置更改",但看不到进行任何更改的说明.

Has something changed between 1.19 and 1.22? I've looked for 'Configuration changes' in the release notes for 1.20, 1.21, and 1.22, but see no instruction to make any change.

请帮助!

谢谢.

推荐答案

记录下来,答案是将数据库主机从更改为

For the record, the answer was to change the DB host from

$ wgDBserver ="localhost:/tmp/mysql5.sock"

$wgDBserver = "localhost:/tmp/mysql5.sock"

公正

$ wgDBserver ="localhost"

$wgDBserver = "localhost"

原始字符串应该可以使用,但是MediaWiki 1.19.2中存在一个错误,如下所述:

The original string should have worked, but there is a bug in MediaWiki 1.19.2, described here:

https://bugzilla.wikimedia.org/show_bug.cgi?id=58153

"1.22.0中的新mysqli适配器未正确实现非标准MySQL 端口."

"The new mysqli adapter in 1.22.0 does not properly implement non-standard MySQL ports."

这篇关于尝试升级到1.22时MediaWiki DB连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆