Author: ibytenl
Description:
Symptoms/Reproduction
When installing using a MySQL server that has UTF8 as default charset rather
than Latin-1, installation may fail with the following error:
MediaWiki 1.4.7 installation
Please include all of the lines below when reporting installation problems.
Checking environment...
- PHP 5.0.4: ok
- PHP server API is cgi-fcgi; using ugly URLs (index.php?title=Page_Title)
- Have XML / Latin1-UTF-8 conversion support.
- PHP is configured with no memory_limit.
- Have zlib support; enabling output compression.
- Turck MMCache not installed, can't use object caching functions
- Found GD graphics library built-in, image thumbnailing will be enabled if
you enable uploads.
- Installation directory: C:\Program Files\OmniSecure\htdocs\mediawiki
- Script URI path: /mediawiki
- Warning: $wgSecretKey key is insecure, generated with mt_rand(). Consider
changing it manually.
- Connected as root (automatic)
- Connected to database... 4.1.12a-nt; enabling MySQL 4 enhancements
- Warning: $wgSecretKey key is insecure, generated with mt_rand(). Consider
changing it manually.
- Created database wikidb
- Creating tables...Query "CREATE TABLE cnwiki1_categorylinks ( cl_from
int(8) unsigned NOT NULL default '0', cl_to varchar(255) binary NOT NULL default
'', cl_sortkey varchar(255) binary NOT NULL default '', cl_timestamp timestamp
NOT NULL, UNIQUE KEY cl_from(cl_from,cl_to), KEY
cl_sortkey(cl_to,cl_sortkey(128)), KEY cl_timestamp(cl_to,cl_timestamp) )"
failed with error code "Specified key was too long; max key length is 1024 bytes".
Proposed patch
Append a default charset and collation to line 509 of /config/index.php, so the
query becomes:
"CREATE DATABASE $wgDBname DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci"
Environment used
OS: Windows XP Home SP2
Server: Omnicron OmniSecure v3.0a4
PHP: 5.0.4 (official release pre-built CGI binary)
MySQL: 4.1.12a-nt (Win32)
Version: 1.4.x
Severity: normal
URL: http://meta.wikimedia.org/wiki/Newcomers_guide_to_installing_on_Windows#MySQL_setup