Project:Support desk/Sections/Database

__NEWSECTIONLINK__ = MediaWiki Database Support =

"Read database pages text - Wrong correspondency of text in the db with the one in the wiki"
Hello,

I can't find my the actual pages text in the database, i find but it isn't the actual version but an old version or not correct one. I correspond the last rev_text_id (of a page) in the table_revision with the table_text old_id but the text isn't the actual one (it's an old or a completely different). Did i made something wrong? Did i miss something? What can i do? I need to acces the pages actual text (all revisions if possible).

António antonioavf@gmail.com —213.138.228.242 23:54, 16 August 2008 (UTC)

SQL syntax error

 * MediaWiki version: 1.5.8
 * PHP version: 5.2.6
 * MySQL version: 5.0.51
 * URL: intra net- not available

I created a form from a module for Joomla called Chronoforms, Then I deleted the module without deleting the form. It seems like the form created overwrote a table in database... specifically to the data in the wiki data...and e somehow corrupted a table in the SQL...

How can I fix this issue....when try to open the wikisite i get the following 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 "MediaWikiBagOStuff:_doquery". MySQL returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`��TV��@����ĴS���i�Vɽ�O�?�����g��!oj�C������2��>������/��پ���''�z��ͻ��?A�?'  at line 1 (localhost)".

luis (lucher100@hotmail.com)

—208.60.167.66 15:52, 3 September 2008 (UTC)

User permissions
I installed already the third version of MediaWiki according to the database I am the sysop and bureaucrat, my profile says I have the following rights Member of groups:	Users, Autoconfirmed users, Sysop, bureaucrat (User group rights)
 * MediaWiki version: 1.13.1
 * PHP version: 5.2.5
 * MySQL version: 5.0.62
 * URL: http://www.genealogy.henny-savenije.pe.kr/mediawiki/

Yet, I don't seem to have those rights, if I try to edit the Monobook css page

http://www.genealogy.henny-savenije.pe.kr/mediawiki/index.php?title=MediaWiki:Monobook.css&action=edit

You do not have permission to edit pages, for the following reason: This page provides interface text for the software, and is locked to prevent abuse. You can view and copy the source of this page:

If I search for users, there are none, yet according to the database there are three.

Can anybody help me more with this. I am at my wits end.

—Henny 13:07, 16 September 2008 (UTC)

latin1/binary …

 * MediaWiki - 1.13.1
 * PHP 	    - 5.2.6 (apache2handler)
 * MySQL     - 5.0.51b-community-nt
 * URL:      - Intranet use only

Hello,

I am a newbie at wiki's, so any additional explanations/link/docs will be more than welcome.

Here is my issue. I am trying to set up wiki as a intranet KB (Knowledge Base) tool. And before doing that, i am just testing what is what and which is which and how everything works. I managed to install the wiki and it works just fine. I am now going through the Backup procedures for a wiki, and going through the charset issues, quite frankly leaves me staring.

Not having that much experience, i chose the recommended option of binary charset. If i create the database myself, and set collation to Binary, i get an error when trying to run the installation script (i am running a WAMP server at home, for testing purposes, and will be doing the same on-location, i really don't need to bother on this aspect - or so i think. Database management is via PhpMyAdmin):

Creating tables...Query "CREATE TABLE `searchindex` ( si_page int unsigned NOT NULL, si_title varchar(255) NOT NULL default '', si_text mediumtext NOT NULL, UNIQUE KEY (si_page), FULLTEXT si_title (si_title), FULLTEXT si_text (si_text) ) ENGINE=MyISAM " failed with error code "Column 'si_title' cannot be part of FULLTEXT index (localhost)".

I don't change the options in the installation script, i pretty much leave them the way they are, just fill in the wiki name, the DB name, user and pwd.

If, however, i don't create the database myself, and let the script do it for me, it works like a charm. But i do notice that 2 of the tables are created with different storage engines, as opposed to InnoDB, the one i selected. (I am refering to searchindex and hitcounter). Also, their charset is different, as opposed to binary (the way i requested in the setup script). They are latin1_swedish_ci. I think these 2 exceptional tables are the source for the above error, so i should let the script create the database.

I started going through Manual:Backing up a wiki. And i found the note saying that:

'''In some common configurations of MySQL 4.1 and later, mysqldump can corrupt MediaWiki's stored text. If your database's character set is set to "latin1" rather than "UTF-8", mysqldump in 4.1+ will apply a character set conversion step which can corrupt text containing non-English characters as well as punctuation like "smart quotes" and long dashes used in English text.'''

Now, if i do a STATUS in the mysql console (after selecting the proper database), i get the following: mysql> status -- F:\wamp\bin\mysql\mysql5.0.51b\bin\mysql.exe Ver 14.12 Distrib 5.0.51b, for Win 32 (ia32)

Connection id:         386 Current database:      wspedia Current user:          ODBC@localhost SSL:                   Not in use Using delimiter:       ; Server version:        5.0.51b-community-nt MySQL Community Edition (GPL) Protocol version:      10 Connection:            localhost via TCP/IP Server characterset:   latin1 Db    characterset:    latin1 Client characterset:   latin1 Conn. characterset:    latin1 TCP port:              3306 Uptime:                1 hour 57 min 29 sec

Threads: 1 Questions: 10265  Slow queries: 0  Opens: 1032  Flush tables: 1  Ope n tables: 40 Queries per second avg: 1.456

What this is showing is latin1. But i selected binary, did i not?

If my understanding of the warning in the article is correct, then in my situation i should make sure to mention the charset in the dumping entry, to make sure my tables won't get converted to another charset right? To make sure they remain latin1 and i won't lose information.

Of course, several issues arise here. Or better yet, questions:


 * Why is it showing latin1 if i selected binary?
 * Considering the STATUS above, what will msqldump convert my database into when i dump? I have latin1, but what will it convert it into if i don't select --default-charater-set? Can i tell from this window?
 * Considering i select binary during installation, STATUS shows latin1, should --default-charater-set still say latin1 in the dump entry?

Can anyone please advise on this situation?

Thank you!

Alex - alex@hostingsolution.ro —Screwy 22:32, 20 September 2008 (UTC)

Sleepy/slow wiki

 * MediaWiki version: 1.12.0
 * PHP version: 5.2.6 (apache2handler)
 * MySQL version: 4.1.20
 * URL:

Hello, my server disk became full over the weekend (both /, on which mediawiki is installed, and /var). After deleting some files (not related to mediawiki) to free up space, and restarting apache and mysql, the wiki was back online. It is however extremely slow.

When I request a page, it will show up after 20-30 seconds. After the request, if I do mysqladmin processlist I will see a thread showing up as: ++--+---+--+-+--+---+--+ | Id | User    | Host      | db           | Command | Time | State | Info             | ++--+---+--+-+--+---+--+ | 60 | wikiuser | localhost | mediawiki   | Sleep   | 21   |       |                  |

The thread sleeps for ~20s. After that, the request goes through and the page shows up.

Looks like some type of corruption of the way mediawiki talks with the mysql server. Any suggestions on how to fix this problem?

Thanks very much.

—Jusylves 13:03, 29 September 2008 (UTC)

Lost database

 * MediaWiki version: 1.13.0
 * PHP version: 5.2.5
 * MySQL version: 5.0.51a
 * URL: www.ignorantinc.com/www/ignorantwiki

I had a power outage last night. MediaWiki was working fine and updating the database fine before the outage. I brought the server back up and found my "wiki" database completely empty. The database has been removed as well. However, its just that wiki database and no others. Have you seen/heard of this behavior? At the moment, I have no data.

—67.85.135.74 14:45, 29 September 2008 (UTC) Austin
 * Yup. Scribblewiki crashed also and lost all it's data... --76.65.3.32 03:42, 16 October 2008 (UTC)

(Solved) Move wiki

 * MediaWiki: 1.11.0
 * PHP: 5.2.3 (apache2handler)
 * MySQL: 5.0.41-community-nt

Hello everybody,

I need to move our Company-Wiki from one server to another. Is there a good "how-to"-Page anywhere? All I found was not really usefull for beginners.

Thanks for any idea! chaos-wiki —91.17.53.49 12:23, 1 October 2008 (UTC)


 * Did you check Manual:Moving a wiki? -- :bdk: 17:13, 1 October 2008 (UTC)

Only SQLite available on setup

 * MediaWiki version: 1.13.1
 * PHP version: 5.2.6
 * MySQL version: 5.0.51a-1.fc9
 * URL:

Hi Folks, I've fallen at the final hurdle. I have managed to install mediawiki on my webserver, however, when I go to the setup page, under database type I only have SQLite available. MediaWiki doesn't detect that mysqld is running. How can I get MySQL to appear as an option on the setup page? I have already created a wikidb and a wiki user with required privileges.

—192.193.245.16 16:45, 1 October 2008 (UTC)

Error after atempted recovery of old server

 * MediaWiki version: unsure
 * PHP version: 5.1
 * MySQL version: 5.1
 * URL:

I have recovered data from a previous install that had the server died. I am now getting this:

MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred Query: SELECT value,exptime FROM `objectcache` WHERE keyname='wikidb:messages-hash' Function: MediaWikiBagOStuff::_doquery Error: 1146 Table 'wikidb.objectcache' doesn't exist (localhost) ' in /var/www/html/wiki/includes/Database.php:708 Stack trace:
 * 1) 0 /var/www/html/wiki/includes/Database.php(665): Database->reportQueryError('Table 'wikidb.o...', 1146, 'SELECT value,ex...', 'MediaWikiBagOSt...', false)
 * 2) 1 /var/www/html/wiki/includes/BagOStuff.php(396): Database->query('SELECT value,ex...', 'MediaWikiBagOSt...')
 * 3) 2 /var/www/html/wiki/includes/BagOStuff.php(296): MediaWikiBagOStuff->_doquery('SELECT value,ex...')
 * 4) 3 /var/www/html/wiki/includes/BagOStuff.php(236): SqlBagOStuff->_query('SELECT value,ex...', 'wikidb:messages...')
 * 5) 4 /var/www/html/wiki/includes/MessageCache.php(206): SqlBagOStuff->get('wikidb:messages...')
 * 6) 5 /var/www/html/wiki/includes/MessageCache.php(442): MessageCache->load
 * 7) 6 /var/www/html/wiki/includes/GlobalFunctions.php(420): MessageCache->get('mainpage', true, true)
 * 8) 7 /var/www/html/wiki/includes/GlobalFunctions.php(379): wfMsgGetKey('mainpage', true, true, true)
 * 9) 8 /var/www/html/wiki/includes/GlobalFunctions.php(328): wfMsgReal('mainpage', Array, true, true)
 * 10) 9 /var/www/html/wiki/includes/Title.php(275): wfMsgForContent('mainpage')
 * 11) 10 /var/www/html/wiki/includes/Wiki.php(74): Title::newMainPage
 * 12) 11 /var/www/html/wiki/index.php(17): MediaWiki->checkInitialQueries(NULL, 'view', Object(StubObject), Object(WebRequest), Object(StubContLang))
 * 13) 12 {main}

Exception caught inside exception handler: exception 'DBUnexpectedError' with message 'Error in fetchObject: Table 'wikidb.page' doesn't exist (localhost)' in /var/www/html/wiki/includes/Database.php:825 Stack trace:
 * 1) 0 /var/www/html/wiki/includes/MessageCache.php(315): Database->fetchObject(false)
 * 2) 1 /var/www/html/wiki/includes/MessageCache.php(252): MessageCache->loadFromDB
 * 3) 2 /var/www/html/wiki/includes/MessageCache.php(442): MessageCache->load
 * 4) 3 /var/www/html/wiki/includes/GlobalFunctions.php(420): MessageCache->get('databaseerror', true, false)
 * 5) 4 /var/www/html/wiki/includes/GlobalFunctions.php(379): wfMsgGetKey('databaseerror', true, false, true)
 * 6) 5 /var/www/html/wiki/includes/Exception.php(18): wfMsgReal('databaseerror', Array)
 * 7) 6 /var/www/html/wiki/includes/Database.php(212): MWException->msg('databaseerror', 'Database error')
 * 8) 7 /var/www/html/wiki/includes/Exception.php(109): DBQueryError->getPageTitle
 * 9) 8 /var/www/html/wiki/includes/Exception.php(76): MWException->htmlHeader
 * 10) 9 /var/www/html/wiki/includes/Exception.php(95): MWException->reportHTML
 * 11) 10 /var/www/html/wiki/includes/Exception.php(171): MWException->report
 * 12) 11 /var/www/html/wiki/includes/Exception.php(205): wfReportException(Object(DBQueryError))
 * 13) 12 [internal function]: wfExceptionHandler(Object(DBQueryError))
 * 14) 13 {main}

I do not know what to make of it. I am not sure the database is actually intact, I have webmin installed and it gives me this error when I try to access the wikidb:

SQL show index from `archive` failed : Table 'wikidb.archive' doesn't exist

Ideas? No, this was not backed up before it all died.

—205.189.93.240 19:44, 1 October 2008 (UTC)


 * Run update.php. —Emufarmers(T 22:49, 1 October 2008 (UTC)

(Solved) Get Password from the database

 * MediaWiki version: 1.12.0
 * PHP version: 5.2.6
 * MySQL version: 5.0.51

Hello, I'd like to know if I can get my password from the mediawiki's database (I'm the admin, of course). Someone hacked my user, and now I don't know how to change it. I have full access to the mysql database and the files. I can't provide more information because I don't know english very well, sorry.

Thanks for reading. Bye

—194.158.77.76 19:17, 3 October 2008 (UTC)


 * Reset the password. —Emufarmers(T 23:36, 4 October 2008 (UTC)

CentralAuth does not work
I tried to install CentralAuth following the instructions but it did not work. I cannot merge my accounts with my other two DBs.
 * MediaWiki version: SVN trunk
 * PHP version:
 * MySQL version:
 * URL: Localhost

Here's a section from LocalSettings.php: require_once ("$IP/extensions/CentralAuth/CentralAuth.php"); $wgSharedDB = 'wiki2008'; $wgSharedTables = array( 'user', 'user_groups', 'interwiki'); $wgSharedPrefix = ''; $wgSharedDBUserTable = null;

My wiki's databases are wiki2008, wiki2009, testwiki and wikisite1

What have I done wrong?? —82.42.237.84 10:44, 4 October 2008 (UTC)

Local copy of all images needed ?

 * MediaWiki version: 1.12.0
 * PHP version: 5.2.4
 * MySQL version: 14.12
 * URL:

I have installed a server with a local copy of the french wikipedia database (from the last dump). I got images for some articles with the wikix tool. Everything is working well, I can browse in the encyclopedia from my server. If it is possible, I'd like to load images directly from the web instead of downloading all of them on my hard drive. My question is : is it possible to do it ? and if yes, how can I configure mediawiki ? I've only seen stuffs about the configuration of the local directory that store images in manuals and FAQs. Thank you for your help

—129.175.11.241 16:14, 7 October 2008 (UTC)

MediaWiki 1.13.1 Installation problem

 * MediaWiki version: 1.13.1
 * PHP version: 5.2.6
 * MySQL version: 5.0
 * URL: http://www.niva.com/nivawiki/config/index.php

I have an installation problem. Following message is display:

PHP 5.2.6 installed Could not find a suitable database driver!
 * For MySQL, compile PHP using --with-mysql, or install the mysql.so module
 * For PostgreSQL, compile PHP using --with-pgsql, or install the pgsql.so module
 * For SQLite, compile PHP using --with-pdo_sqlite, or install the pdo_sqlite.so module
 * For MSSQL, compile PHP using --with-mssql not ready, or install the mssql not ready.so module


 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

Will the Latest version Of MediaWiki work with Oracle 10i ? I've tried to search for this answer but haven't found it.

Thanks, Ken

—205.141.247.28 19:09, 8 October 2008 (UTC)
 * I don't think so... Anyways just use MYSQL. --76.65.3.32 03:47, 16 October 2008 (UTC)

Text Page
I've got MediaWiki working, however, I'm curious to know how to view the text table's contents in PHPmyadmin as I can't see the deleted page's text. Anyone know how it's done! Ta, —82.42.237.84 22:40, 16 October 2008 (UTC)
 * MediaWiki version: SVN trunk
 * PHP version: 5.26
 * MySQL version:
 * URL: N/A, testing on localhost

Installation problem with 1.14alpha and PostgreSQL
While the installation of 1.13.2 works fine, 1.14alpha cannot be installed with PostgreSQL (updating from 1.13.2 also does not work properly). Installing on a MySQL-Server also worked fine.
 * MediaWiki version: 1.14alpha
 * PHP version: 5.2.6
 * PostgreSQL version: 8.3.4
 * URL:

PostgreSQL says: DB Connection error: Unable to connect to PostgreSQL server: FATAL: no PostgreSQL user name specified in startup packet

—141.44.21.8 11:25, 29 October 2008 (UTC)


 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

Hi,

Please note that while I am trying to save some content in a wiki page I am getting this 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 "RecentChange::save". MySQL returned error "1062: Duplicate entry '305' for key 1 (localhost)".

The error appears when I try to save the page for the first time. If I press the Back button of browser and retry it works.

Can you pls shed some lights on whats the error may be?

Regards, Jagbir

—Jagbir 14:06, 4 November 2008 (UTC)