Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Error applying MR65.SQL – ERROR at line 3: Specified key was too long;

  • Error applying MR65.SQL – ERROR at line 3: Specified key was too long;

    Posted by JonRussell on August 22, 2023 at 23:38

    Hi,

    I’m trying to run the MR65 file in the latest release. I get an error:

    [root@pandora ~]# cat /var/www/html/pandora_console/extras/mr/65.sql | mysql -vvv -u pandora pandora
    --------------
    START TRANSACTION
    --------------
    Query OK, 0 rows affected (0.00 sec)
    --------------
    CREATE TABLE IF NOT EXISTS tdiscovery_apps (
    id_app int(10) auto_increment,
    short_name varchar(250) NOT NULL DEFAULT '',
    name varchar(250) NOT NULL DEFAULT '',
    section varchar(250) NOT NULL DEFAULT 'custom',
    description varchar(250) NOT NULL DEFAULT '',
    version varchar(250) NOT NULL DEFAULT '',
    PRIMARY KEY (id_app),
    UNIQUE (short_name)
    ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4
    --------------
    ERROR 1071 (42000) at line 3: Specified key was too long; max key length is 767 bytes
    Bye

    Any ideas?

    Thanks.

    Jon.

    JonRussell replied 1 year, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Sergio

    Administrator
    August 23, 2023 at 12:13
    1346 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    1
    Down
    Drop it
    ::

    Hello,

    Are you using MariaDB as MySQL engine?

    A workaround that you can do is to disable the innodb_strict_mode variable, then execute the MR, and then enable it once again.

    To do this just log into MySQL as ROOT and execute this query:

    SET SESSION innodb_strict_mode=OFF

    Once the MR is correctly applied you can turn it on again

    SET SESSION innodb_strict_mode=ON

    Let us know if this helped.

    Kind regards,

    Sergio B.

    • JonRussell

      Member
      August 23, 2023 at 14:51
      273 Karma points
      Community rank: tentacle-noob-1 Tentacle noob
      Like it
      Up
      1
      Down
      Drop it
      ::

      Yes, I am on MariaDB.

      That fix worked. Thank you!

      Regards,

      Jon.