Manual:IBM DB2

The purpose of this page is to collect information and experiences about running MediaWiki on IBM DB2.

MediaWiki might support IBM DB2 starting with 1.15 (scheduled for May 2009). Code for this is currently in the trunk.

There may be issues with maintenance scripts and some of the special pages, which tend to use hard-coded SQL instead of the MW database API.

Database Creation
Before you can run the MediaWiki web installer, you have to create a database for MediaWiki to hold its data. In the commands below, wikidb is the name of the database. If you are using the command line, you will have to issue the commands in a single line each.

db2 CREATE DATABASE wikidb AUTOMATIC STORAGE YES USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM PAGESIZE 32768

Assuming DB2 Text Search is installed, enable the database for Full Text Search indexing. The following is a

db2text ENABLE DATABASE FOR TEXT CONNECT TO wikidb

SQL data types
The exceptions are el_to and el_index in the externallinks table and ipb_address, ipb_reason, ipb_range_start, and ipb_range_end in the ipblocks table. These are all VARCHAR(255) because they are used in indexes.