Last modified: 2012-04-28 17:24:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31529, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29529 - Can't connect to MySQL after upgrading to 1.17
Can't connect to MySQL after upgrading to 1.17
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.17.x
PC Linux
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-22 14:49 UTC by mcy
Modified: 2012-04-28 17:24 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Messages in syslog when loading http://mwtest.lm7.fr/ (6.03 KB, application/octet-stream)
2011-06-22 14:49 UTC, mcy
Details
Messages in syslog with MySQL 5.1 (8.49 KB, application/octet-stream)
2011-06-23 07:58 UTC, mcy
Details
Messages in syslog with MySQL 5.1, MediaWiki 1.16.5 (18.06 KB, application/octet-stream)
2011-06-24 09:30 UTC, mcy
Details

Description mcy 2011-06-22 14:49:44 UTC
Created attachment 8690 [details]
Messages in syslog when loading http://mwtest.lm7.fr/

Hi,

I upgraded two wikis (from 1.13 and 1.15) to MediaWiki 1.17.0, and in both cases I got the same error when trying to load a page:
« Can't contact the database server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) (localhost) »

I reverted the files to the old 1.15 version, and the wiki works again (read-only of course).

I tried a fresh install on the same server, and got again the error. This fresh install is here, if it can help: http://mwtest.lm7.fr/

The server is a Debian Squeeze amd64. When I load a page on my test wiki, I get a whole bunch of messages (see attachment). It seems that MySQL crashes, so it is maybe a bug in MySQL, but my others wikis running MW 1.15 work fine.

If you need any other information or testing, please don't hesitate to ask. 

Cheers,

  Matteo
Comment 1 Mark A. Hershberger 2011-06-22 18:44:00 UTC
It isn't clear to me what the difference is between your installs that
would cause the problem.  Have you changed your LocalSettings.php
file?

What are the $wgDB* variables? (password not necessary)

What does "dpkg -l php5-mysql mysql-server mysql-client libmysqlclient16" show?
Comment 2 mcy 2011-06-23 07:56:22 UTC
(In reply to comment #1)
> It isn't clear to me what the difference is between your installs that
> would cause the problem.  Have you changed your LocalSettings.php
> file?

The LocalSettings.php of my old installs were customised, but I did not change them after upgrading. For the fresh test install, I just uploaded the LocalSettings.php provided by the installer without any change.


> What are the $wgDB* variables? (password not necessary)

Here is what I have for the test install.

# grep wgDB LocalSettings.php
$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "mydatabase";
$wgDBuser           = "myuser";
$wgDBpassword       = "mypassword";
$wgDBprefix         = "";
$wgDBTableOptions   = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
$wgDBmysql5 = false;


> What does "dpkg -l php5-mysql mysql-server mysql-client libmysqlclient16" show?

Thanks for asking, I noticed that I still had the lenny version of MySQL (5.0). Here is the results after upgrading:

ii  libmysqlclient16  5.1.49-3  MySQL database client library
ii  mysql-client      5.1.49-3  MySQL database client (metapackage depending on the latest version)
ii  mysql-server      5.1.49-3  MySQL database server (metapackage depending on the latest version)
ii  php5-mysql        5.3.3-7+squeeze1  MySQL module for php5

Unfortunately the upgrades does not solves the problem. The syslog messages are slightly different (see attachment #2 [details]), but I'm not sure it is relevant.

  Matteo
Comment 3 mcy 2011-06-23 07:58:14 UTC
Created attachment 8695 [details]
Messages in syslog with MySQL 5.1
Comment 4 mcy 2011-06-23 08:00:04 UTC
(In reply to comment #2)
> The syslog messages are
> slightly different (see attachment #2 [details])

Of course it is attachment #8695 [details].
Comment 5 Mark A. Hershberger 2011-06-23 22:03:19 UTC
Are you sure your tables are not corrupt?  What does mysqlcheck say
when you run it against the DB?

Have you run the upgrade script so that any schema changes are put in
place?
Comment 6 Brion Vibber 2011-06-23 22:06:50 UTC
That log *definitely* shows that MySQL itself is crashing; likely causes:

* hardware problems (bad RAM, disk, or other component corrupting data/CPU state)
* bug in MySQL
* corrupted database + bug in MySQL

Things to try:
* shut down the server! copy all mysql data to a fresh machine and see if it continues to have problems
* dump/restore the database to ensure there's no internal consistency errors
* contact Oracle for commercial MySQL support?
Comment 7 mcy 2011-06-24 07:28:58 UTC
(In reply to comment #5)
> Are you sure your tables are not corrupt?

Do you mean the MW installer would create a corrupted DB? ;-)

> What does mysqlcheck say
> when you run it against the DB?

Everything seems OK:

mwtest.archive                                     OK
mwtest.category                                    OK
mwtest.categorylinks                               OK
mwtest.change_tag                                  OK
mwtest.external_user                               OK
mwtest.externallinks                               OK
mwtest.filearchive                                 OK
mwtest.hitcounter
note     : The storage engine for the table doesn't support check
mwtest.image                                       OK
mwtest.imagelinks                                  OK
mwtest.interwiki                                   OK
mwtest.ipblocks                                    OK
mwtest.iwlinks                                     OK
mwtest.job                                         OK
mwtest.l10n_cache                                  OK
mwtest.langlinks                                   OK
mwtest.log_search                                  OK
mwtest.logging                                     OK
mwtest.math                                        OK
mwtest.module_deps                                 OK
mwtest.msg_resource                                OK
mwtest.msg_resource_links                          OK
mwtest.objectcache                                 OK
mwtest.oldimage                                    OK
mwtest.page                                        OK
mwtest.page_props                                  OK
mwtest.page_restrictions                           OK
mwtest.pagelinks                                   OK
mwtest.protected_titles                            OK
mwtest.querycache                                  OK
mwtest.querycache_info                             OK
mwtest.querycachetwo                               OK
mwtest.recentchanges                               OK
mwtest.redirect                                    OK
mwtest.revision                                    OK
mwtest.searchindex                                 OK
mwtest.site_stats                                  OK
mwtest.tag_summary                                 OK
mwtest.templatelinks                               OK
mwtest.text                                        OK
mwtest.trackbacks                                  OK
mwtest.transcache                                  OK
mwtest.updatelog                                   OK
mwtest.user                                        OK
mwtest.user_groups                                 OK
mwtest.user_newtalk                                OK
mwtest.user_properties                             OK
mwtest.valid_tag                                   OK
mwtest.watchlist                                   OK


> Have you run the upgrade script so that any schema changes are put in
> place?

Of course. And once again, it is the same with the old upgraded wiki and with new install.


(In reply to comment #6)
> That log *definitely* shows that MySQL itself is crashing; likely causes:
> 
> * hardware problems (bad RAM, disk, or other component corrupting data/CPU
> state)
> * bug in MySQL
> * corrupted database + bug in MySQL

That's not impossible, but any other MySQL-based application works fine (MW 1.15, other CMS, etc.). As I showed before, this really seems to be related to the MW 1.17 files.

I can try a fresh install of the last MW 1.16.x, if it could help?

> Things to try:
> * shut down the server! copy all mysql data to a fresh machine and see if it
> continues to have problems

I have backups, I can test the sites (or a fresh install) on another machine.

> * dump/restore the database to ensure there's no internal consistency errors

Should I really do that on a fresh install? The database is the one created by the installer, verbatim.
Comment 8 mcy 2011-06-24 09:30:12 UTC
Created attachment 8698 [details]
Messages in syslog with MySQL 5.1, MediaWiki 1.16.5
Comment 9 mcy 2011-06-24 09:31:10 UTC
OK so I did some install tests:
- MW 1.15.1 on my Debian squeeze server (http://mwtest15.lm7.fr/ ): works fine, as my currently installed wiki with the same version.
- MW 1.16.5 on my Debian squeeze server (http://mwtest16.lm7.fr/) : does not work. The messages showed by MW are not the same, but the syslog output is pretty similar (see attachment #8698 [details]).
- MW 1.17.0 on OpenBSD 4.9 (mysql-server-5.1.54p3, php5-mysql-5.2.17): works fine.
Comment 10 mcy 2012-04-28 17:24:48 UTC
Hi there,

Just a quick note to close this bug, at it does not appear any more on my config. Both fresh installs of MW 1.17.0 and 1.18.3 work fine, and upgrade from 1.15 to 1.18 works fine too.

The bug is likely to be due to the version on MySQL used in Debian squeeze at the time. For information, the current working versions of the MW-related packages are the following:

ii  libmysqlclient16       5.1.61-0+squeeze1
ii  mysql-client           5.1.61-0+squeeze1
ii  mysql-server           5.1.61-0+squeeze1
ii  php5-mysql             5.3.3-7+squeeze8

Cheers,
  Matteo

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links