Topic on Project:Support desk

Cannot connect database server

10
88.130.117.164 (talkcontribs)

My 1.24.1 installation is in error now (msg:Cannot connect database server) after FastWebHost upgraded the php on server from 5.3 to 5.4. FastWebHost support tells me "upgrade all your site applications or coding parts to PHP5.4 from PHP5.3."

Kristin

This post was posted by 88.130.117.164, but signed as 213.213.153.168.

88.130.117.164 (talkcontribs)

Hi Kristin,

MediaWiki 1.24 is compatible with PHP 5.3 and with 5.4, see Compatibility#Software_required_to_run_MediaWiki. At least for the MediaWiki software itself, there is nothing to upgrade.

However, you have not told us where exactly you get this error message, so I am not exactly sure what is happening. Anyway, a "Cannot connect database server" error usually means that the database server is not available currently. Most likely the MySQL server is just not running. If you are on a shared host, meaning if FastWebHost offers you the server, then you won't be able to fix that yourself. This is something they have to fix.

Would be interesting to know, if you can connect to the database server differently, e.g. using something like PHPMyAdmin (which FastWebHost might have to give you access to the DB).

217.28.190.130 (talkcontribs)

Thanks thats what I thought. I can connect to the db through PHPMyAdmin - everything seems to be ok. The mediawiki is set up on uppskrift.belgur.net (don't mind the errors on belgur.net - this is a wordpress setup no longer being updated or maintained)

88.130.88.162 (talkcontribs)

This is the error, which you get:

 Sorry! This site is experiencing technical difficulties.

 Try waiting a few minutes and reloading.

 (Cannot contact the database server)

This error definitely is not output by MediaWiki. According to the HTTP header it seems to be output by the server:

HTTP/1.0 500 Internal Server Error =>
Date => Tue, 23 Jun 2015 11:52:29 GMT
Server => LiteSpeed

Is it possible that together with the PHP upgrade the host also changed something with the MySQL server? E.g. that they changed the server and it now is available under a different IP address? That would be relevant for the value of $wgDBserver. Please also double check the MySQL username and password, which you have provided in LocalSettings.php. A mistake there can also cause this problem.

217.28.190.130 (talkcontribs)

Thanks for your help. I forwarded the info to the FastWebHost support and they have fixed this finally. My wiki is now working fine. I last updated mediawiki in March and have since then not done any changes to the config so I guess they changed something on the server that caused this to break. Not very reassuring and their support people don't seem to know much.

But this is fixed now and I am happy.

Thanks again. Kristin

88.130.88.162 (talkcontribs)

Yepp, some webhosts are more likely to break their customer's systems than others. I realize there seems to be a correlation: The more money you spend in hosting, the less likely will you have problems with it.

Something that you might still want to do is: Upgrade your MediaWiki installation to a current version. That is 1.24.2 (where doing an upgrade should be trivial) or 1.25.1, which is even newer.

217.28.190.130 (talkcontribs)

Yes I should upgrade - it always makes me a bit worried though since I don't have complete control in this hosting environment. :S You think 1.25.1 is ok considering the topic of this thread?

Kristin

88.130.88.162 (talkcontribs)

You mean if you will run into strange problems with your host when you upgrade to 1.25? I don't know that. Maybe you do... ;-)

An upgrade from 1.24.1 to 1.24.2 is basically simple; you only have to replace the files and that is it. If that is done correctly, I think that nothing will break.

And if you have a backup of your system (files and database), then you can also try an upgrade to 1.25. But basically that is also what our guide Upgrading tells you: Make sure you have a working backup!

217.28.190.130 (talkcontribs)

Yes of course I have gone through this a few times. I might start with 1.24.2 ;)

Kristin

192.8.61.2 (talkcontribs)
Reply to "Cannot connect database server"