Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-1470

Cannot import zabbix 2.0.* images into DB with other images

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 2.0.2, 2.0.3
    • mysql, but suspect other SQL server too
      frontend

      If I have a Zabbix environment with old/custom images uploaded already, I cannot import images.sql because it tries to overwrite old imageid

      I fixed this, by setting imageid column with AUTO_INCREMENT as follows (image_table_create.sql):

      mysql> describe images;
      ----------------------------------------------------------+

      Field Type Null Key Default Extra

      ----------------------------------------------------------+

      imageid bigint(20) unsigned NO PRI NULL auto_increment
      imagetype int(11) NO MUL 0  
      name varchar(64) NO   0  
      image longblob NO   NULL  

      ----------------------------------------------------------+
      4 rows in set (0.00 sec)

      mysql>

      and images.sql should have not imageid definitions, like this line (images_fixed.sql):

      INSERT INTO `images` (`imagetype`,`name`,`image`) VALUES (1,'Cloud_(128)',0x89504E470D0A1A [..........]);

            Unassigned Unassigned
            sergio.cricca sergio cricca
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: