Results 1 to 2 of 2

Thread: MySql Error (Specified key was too long; max key length is 1000 bytes)

  1. #1
    Join Date
    Jun 2007
    Porto Alegre, RS, Brazil
    Rep Power

    Default MySql Error (Specified key was too long; max key length is 1000 bytes)

    Hi there

    I have quite a few corrupted mboxgroups inside Zimbras MySQL and im following the procedure outlined HERE to try to recover them.

    I did that in the past and it worked fine. Now im facing a problem with a Zimbra 7.1.4 installation, CentOS 5.7 64bits.

    When running this step:

    mysql zimbra < /tmp/mysql.sql/zimbra.sql

    Im getting this error:

    ERROR 1071 (42000) at line 741: Specified key was too long; max key length is 1000 bytes

    Line 741 says:

    -- Table structure for table `scheduled_task`

    /*DROP TABLE IF EXISTS `scheduled_taskk`; */
    /*!40101 SET @saved_cs_client = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */; CREATE TABLE `scheduled_task` (
    `class_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
    `name` varchar(255) NOT NULL,
    `mailbox_id` int(10) unsigned NOT NULL,
    `exec_time` datetime DEFAULT NULL,
    `interval_millis` int(10) unsigned DEFAULT NULL,
    `metadata` mediumtext,
    PRIMARY KEY (`name`,`mailbox_id`,`class_name`),
    KEY `i_mailbox_id` (`mailbox_id`),
    CONSTRAINT `fk_st_mailbox_id` FOREIGN KEY (`mailbox_id`) REFERENCES `mailbox` (`id`) ON DELETE CASCADE
    /*!40101 SET character_set_client = @saved_cs_client */;

    -- Dumping data for table `scheduled_task`

    If i change the "PRIMARY KEY" line to have only two fields for primary key, the statement works.

    Any clues?


  2. #2
    Join Date
    Jul 2012
    Bangalore, India
    Rep Power


    Could you post your /opt/zimbra/conf/my.cnf file, as well as the logs when the dump was restored?

    You could try running /opt/zimbra/libexec/zmmyinit, but this will delete EVERYTHING, including my.cnf and all databases, so use with caution. It will restore my.cnf to its original state, which I think could be required here.

Similar Threads

  1. Replies: 3
    Last Post: 02-07-2011, 09:47 AM
  2. zimbra.log 0 bytes - stopped after logrotate.
    By acesuares in forum Administrators
    Replies: 3
    Last Post: 10-25-2010, 07:13 AM
  3. Replies: 5
    Last Post: 04-17-2010, 06:30 AM
  4. Installation Error: Java.long.arrayindex out of bounds
    By in forum Installation Help
    Replies: 3
    Last Post: 12-12-2008, 02:16 PM
  5. Bytes transfered for POP and IMAP
    By bonadio in forum Administrators
    Replies: 6
    Last Post: 03-21-2008, 08:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts