Project:Support desk/Sections/Database

__NEWSECTIONLINK__ = MediaWiki Database Support =

(RESOLVED) Wiki Encoding Problem

 * MediaWiki: 1.11.0
 * PHP: 5.2.3 (cgi-fcgi)
 * MySQL: 5.0.37-community-nt
 * URL: http://wiki.myelectrical.com/

I have had a wiki up and running for a year or so without problems. Recently I have just moved to Dubai and when I first tried the wiki here I received the following error (on some pages only):

''Content Encoding Error (content_encoding_error) Server response could not be decoded using encoding type returned by server. This is typically caused by a Web Site presenting a content encoding header of one type, and then encoding the data differently. For assistance, contact your network support team.''

The wiki was fully functional before I arrived in Dubai (and may still be in other countries). After further investigation I found that the wiki is functional except for certain pages:

http://wiki.myelectrical.com

http://wiki.myelectrical.com/index.php

http://wiki.myelectrical.com/index.php?title=Special:Random

http://wiki.myelectrical.com/index.php?search=iec

etc.

Example working pages are:

http://wiki.myelectrical.com/index.php?title=Main_Page

http://wiki.myelectrical.com/index.php?title=Special:Recentchanges

http://wiki.myelectrical.com/index.php?title=CT_Dimensioning

... most article pages seem to be working

http://wiki.myelectrical.com/index.php?xx (where xx can be a lot of things)

etc.

I've tried quite a lot of things to resolve this without success. Any suggestions/help would be much appreciated.

—62.140.211.130 06:55, 6 February 2008 (UTC)


 * The non-working pages are now working. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  21:09, 27 February 2008 (UTC)

Peter, the pages are only working in some countries (for example I know they are working in the US). I'm here in the UAE and they are still not working. It appears to be pages that redirect to other pages that do not work (wiki.myelectrical.com and special:random for example). Other mediawiki sites work here in the UAE and I have used the same notebook here and in the US (so firewalls/IE settings would not appear the be the problem).


 * Huh... didn't get that part ok. First of all could you sign your posts with ? My geography knowledge is... well... horrible, so does where ever you are use Latin characters in their language? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  21:07, 28 February 2008 (UTC)

Peter, I'm quite new here in the UAE and I'm not sure if they use Latin or not. If you know of some testing I could carry out to see if things are affected by this please let me know., Steven  62.140.211.130 05:03, 3 March 2008 (UTC)


 * UAE? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  04:43, 6 March 2008 (UTC)

UAE - United Arab Emirates. Anyhow for some strange reason things started working today. I've marked the issue as resolved and will remove the resolve if it happens again. 62.140.211.130

Sorting of category page

 * MediaWiki: 1.11.0
 * PHP: 5.1.4 (apache2handler)
 * MySQL: 5.0.21-community-nt

On a Category:XX page of my wiki I see page links grouped by first letter, that is OK, but groups themselves (letters) are arranged in random order (page names are non-english!), is it possible to alphabetize them?

—Konstbel 16:55, 7 February 2008 (UTC)


 * The order is imposed by the database, and the order is probably not "random", but byte-wise, instead of alphabetically. You may get better results when using the "experimental utf8" veriation of the database setup, instead of "compatibility mode". This is an option diring installation, i have no idea how to change it later. Also note that "experimental utf8" mode relies on mysql's own utf8 support, which is incomplete. It may work better than "compatibe" (binary) mode for your language, but as soon as you use a character from some ''very' odd language (like, for example, gothic), it will not work at all, producing a fatal error.
 * Sadly, I don't know a good way out of this dilemma, short of waiting for real unicode support in mysql. -- Duesentrieb ⇌ 10:09, 8 February 2008 (UTC)


 * I looked at wiki database, and noticed, that most varchar fields have utf8_bin comparison instead of utf8_general_ci. Is this the reason? I tried to change to utf8_general_ci, but without visible effect :-( --Konstbel 15:13, 12 February 2008 (UTC)


 * Is your Wiki set to the language that you are writing in? And can you give a URL? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  23:29, 28 February 2008 (UTC)


 * Yes, the language is the same. Sorry, it is intranet wiki, without external access --89.175.73.253 12:41, 19 March 2008 (UTC)

Incorrect UTF-8 chars conversion

 * MediaWiki: 1.11.0
 * PHP: 5.1.4 (apache2handler)
 * MySQL: 5.0.21-community-nt

I suppose, that UTF-8 chars converted to lower/uppercase incorrectly. It makes a really HUGE problems in wiki: the search does not find what I'm looking for, the categories sorted incorrectly (see problem above), the Extension:SearchLog also displays incorrect characters (also see problem above).

Is it possible to fix that?

—Konstbel 10:12, 14 February 2008 (UTC)


 * Searching and sorting are done by the database, and per default, mediawiki tells mysql to treat all data as binary. The reason is that mysql's utf-8 support is broken for some "rare" scripts (those using 4-byte codes), like gothic. You can specify "experimental utf-8 mode" during installation, then unicode collation should apply correctly (but you will get database errors when you try to use "unsupported" characters). I don't know how this can be changed after the wiki has already been installed. I suppose you would have to change the charset/collations on all tables manually. -- Duesentrieb ⇌ 11:54, 14 February 2008 (UTC)


 * Do I need to convert only database or I need also some modifications in wiki code? --Konstbel 09:32, 15 February 2008 (UTC)


 * Newbie question. Does a lack of using "experimental utf-8 mode" explain why some characters at wikipedia display fine but when used in mine it displays as the little boxes. For instance this reference ˈwɪkə which doesn't seem to convert here either. It certainly does at wikipedia though. --WilHatfield 21:29, 14 March 2008 (UTC)

Long String of Numbers after moving Wiki

 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

My company has an internal wiki which we use for internal standardization. We just recently moved the wiki from one box to a newer more up to date box. I did a SQL Dump of the database, recreated the username with all the permssions, copied the Wiki directory to the new box, everything seemed to go smoothly but then when I opened the main page in the content area there is a long string of number of letters. This is on every page. I have no idea where to trouble shoot on this. Any help would be greatly appreciated.

Steve,  mailto:sbarbera@newportharbor.com —24.249.29.209 14:33, 26 February 2008 (UTC)


 * You should post those strange string right here, maybe someone knows what it means ... letters or numbers or both??
 * And don't forget to complete those version lines above. --Detlef Lindenthal 20:40, 26 February 2008 (UTC)

Rename user using SQL

 * MediaWiki: 1.7.1
 * PHP: 5.2.0-8+etch10 (apache2handler)
 * MySQL: 5.0.32-Debian_7etch5-log
 * URL: RISE

I renamed a user using the SQL instructions in MediaWiki FAQ (See But can I rename the user, then?). But MySQL complains: ERROR 1146 (42S02) at line 3: Table 'mediawiki.cur' doesn't exist (mediawiki is the name of the database). Kindly help.

—203.199.213.130 09:37, 13 March 2008 (UTC)
 * Why not use Extension:Renameuser? Aaron 11:51, 28 March 2008 (UTC)

Pagetitle Encoding Problems (Chinese) after Move & Upgrade of MediaWiki

 * MediaWiki: 1.12.0
 * PHP: 5.2.4 (cgi)
 * MySQL: 4.1.13
 * URL: Rock in China Wiki

Hi, I upgraded MediaWiki and moved Servers from to the one mentioned above.
 * MediaWiki: 1.6.8
 * PHP: 4.3.10-22 (cgi-fcgi)
 * MySQL: 4.1.11-Debian_4sarge7-log
 * URL: http://web125.burns.kundenserver42.de/rockinchina/wiki/

I exported the complete database via phpMyAdmin 2.11.0-rc1 on the old server and imported it via mysql command line. Settings for collation on database and tables seem to be the same. Files have been moved completely and then upgraded to the new version.

The problem now is that pages with Chinese titles are broken. An example can be seen here:
 * Old/Good: http://web125.burns.kundenserver42.de/rockinchina/wiki/index.php?title=Badhead_3_%E8%8A%B1%E5%9B%AD%E6%9D%91_%28VA%29
 * New/Broken: http://wiki.rockinchina.com/index.php?title=Badhead_3_%C3%A8%C5%A0%C2%B1%C3%A5%E2%80%BA%C2%AD%C3%A6%3F%E2%80%98_%28VA%29

The pages show up wrong in category lists and links to these pages are broken.

Any pointers on this problem would be highly appreciated.

Thank you very much!

—Matsch 22:49, 25 March 2008 (UTC)

Delete history
Hello! Is there a way to delete the history of an article in my wiki? So often I change an article so longer will be the list of the versions. Isn't it space on my disc, if there are so many versions to an article in my wiki? So I want to delete the history time to time, but how? Thank you for your replies, Doc Taxon 17:22, 27 March 2008 (UTC)
 * Are you using compression? Aaron 11:50, 28 March 2008 (UTC)
 * I do not know, whether I am using compression. How can I find out? Doc Taxon 15:01, 28 March 2008 (UTC)

Identifying the Name of the Namespace from the ID in the Page table
Where is the name of the namespace stored in the database tables? Want to utilize the namespace feature to origanize user information.

Does mediawiki works if I change table InnoDB to MyIsam ?

 * MediaWiki: 1.9.3
 * PHP: 5.2.5 (cgi)
 * MySQL: 5.0.45-log
 * URL: http://aspic-dti.ovh.org/index.php?title=Accueil

Hello,

To save sql space, I have passed all InnoDB sql tables in MyIsam type.

Will there be some problems or will it just be a more bit slower ?

Best Regards

—Aspic 22:28, 31 March 2008 (UTC)

DB Error

 * MediaWiki: 1.12.0.
 * PHP:
 * MySQL: 5.0.33-log
 * URL:

Hi

i need help. i have configured wiki and than this :(

Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "Article::pageData". MySQL returned error "1267: Illegal mix of collations (latin2_bin,IMPLICIT)     and (latin1_swedish_ci,COERCIBLE) for operation '=' (db2.clevernet.cz)".

Could anyone help me what can i do with this?

Sari

—85.160.33.115 19:03, 4 April 2008 (UTC)


 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

I've downloaded from wikipedia the database. And there i didn't find any explications about how can i integrate the database into my wiki website. The database is in XML format. Please tell me how can i import that database into my wiki site.

Thank you!

—79.119.149.93 16:04, 6 April 2008 (UTC)