Author: nygreen
Description:
When installing on a system running MySQL 5, the setup script cannot create the
databases.
Steps to reproduce:
- Have a system running MySQL 5
- Download a fresh copy of MediaWiki (I've tested both 1.8.2 and 1.9-svn)
- Try to install as usual (i.e. chmod a+r on the config folder and click the
config link)
The complete output is included below. The essential part is: ( [...] means I've
taken something out)
Query "CREATE TABLE dw_user ( [...], user_password tinyblob NOT NULL default
'', [...] ) TYPE=InnoDB, DEFAULT CHARSET=utf8 " failed with error code
"BLOB/TEXT column 'user_password' can't have a default value (localhost)".
This means the problem is that MediaWiki is trying to set default values for a
blob or text column, but in MySQL 5 "BLOB and TEXT columns cannot have DEFAULT
values." (quoted from http://dev.mysql.com/doc/refman/5.0/en/blob.html)
Complete output:
- PHP 5.1.6 installed
- Found database drivers for: MySQL
- PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
- Have XML / Latin1-UTF-8 conversion support.
- PHP is configured with no memory_limit.
- Have zlib support; enabling output compression.
- Couldn't find Turck MMCache, eAccelerator or APC. Object caching functions
cannot be used.
- GNU diff3 not found.
- Found GD graphics library built-in, image thumbnailing will be enabled if
you enable uploads.
- Installation directory: C:\Documents and Settings\All
Users\Dokumenter\htdocs\mediawiki-svn\wiki
- Script URI path: /mediawiki-svn/wiki
- Environment checked. You can install MediaWiki.
- Warning: $wgSecretKey key is insecure, generated with mt_rand(). Consider
changing it manually.
Generating configuration file... * Database type: MySQL * Loading class: DatabaseMysql * Attempting to connect to database server as root...success. * Connected to 5.0.26-community-nt; enabling MySQL 4.1/5.0 charset mode * Created database devwikidb * Creating tables... using MySQL 5 table defs...Query "CREATE TABLE
dw_user ( user_id int(5) unsigned NOT NULL auto_increment, user_name
varchar(255) binary NOT NULL default '', user_real_name varchar(255) binary NOT
NULL default '', user_password tinyblob NOT NULL default '', user_newpassword
tinyblob NOT NULL default '', user_email tinytext NOT NULL default '',
user_options blob NOT NULL default '', user_touched char(14) binary NOT NULL
default '', user_token char(32) binary NOT NULL default '',
user_email_authenticated CHAR(14) BINARY, user_email_token CHAR(32) BINARY,
user_email_token_expires CHAR(14) BINARY, user_registration CHAR(14) BINARY,
PRIMARY KEY user_id (user_id), UNIQUE INDEX user_name (user_name), INDEX
(user_email_token) ) TYPE=InnoDB, DEFAULT CHARSET=utf8 " failed with error code
"BLOB/TEXT column 'user_password' can't have a default value (localhost)".
Version: 1.9.x
Severity: major