Page MenuHomePhabricator

Specified key was too long during installation of version 1.6.10
Closed, InvalidPublic

Description

Author: wikipedia.org-mail

Description:
January 6, 2008

I have done a clean install on my wiki.

I was running version 1.5.8. I deleted all of it.

I installed version 1.6.10.

How do I fix this error?

" failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)"

I appreciate your help. Thanks.

David

The following is the error message received while doing the config setup.

  • There are already MediaWiki tables in this database. Checking if updates are needed...

...hitcounter table already exists.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...logging table already exists.
...validate table already exists.
...user_newtalk table already exists.
...transcache table already exists.
...trackbacks table already exists.
...externallinks table already exists.
Creating job table...Query "CREATE TABLE job (
job_id int(9) unsigned NOT NULL auto_increment,
job_cmd varchar(255) NOT NULL default '',
job_namespace int NOT NULL,
job_title varchar(255) binary NOT NULL,
job_params blob NOT NULL default '',
PRIMARY KEY job_id (job_id),
KEY (job_cmd, job_namespace, job_title)
) TYPE=InnoDB
" failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)".


Version: 1.6.x
Severity: critical
OS: Linux

Details

Reference
bz12531

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 10:01 PM
bzimport set Reference to bz12531.
bzimport added a subscriber: Unknown Object (MLST).

jeluf wrote:

Which MySQL version are you using?
Which PHP version are you using?

wikipedia.org-mail wrote:

Thanks for your interest.

We are running..

PHP: 4.3.9 (apache2handler)
MySQL: 4.1.20

David

1.6 branch is long obsolete; current versions use a smaller job_cmd field, 60 characters, which will work.

If at all possible, upgrade to a modern version of PHP and MediaWiki.

If that's not possible, there are two easy fixes:

  1. Change the default collation on MySQL to Latin-1 from UTF-8. (The UTF-8 mode in MySQL doesn't work properly and makes the indexes bigger.)
  1. Change maintenance/tables.sql to use a smaller size for this field and any other field that is too big.